__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/47443224 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void playTackler() {
abstract_robot.setDisplayString("Tackler");
nextposition = TACKLER;
Vec2 odribbler = closestTo(eoppteam, eball);
Vec2 ogoal = new Vec2(eourgoal.x, eourgoal.y);
ogoal.sub(odribbler);
ogoal.setr(abstract_robot.RADIUS);
ogoal.add(odribbler);
nextmove.sett(ogoal.t);
nextmove.setr(MAXSPEED);
if (odribbler != eopponent)
avoidCollision();
}
COM: <s> has player play tackler </s>
|
funcom_train/39189550 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void assertContentDoesNotContainText(String text, TextSearchType type) {
checkAttributes();
if (checkConstructorParam()) {
Assert.assertFalse(TESTEDDOC + pdfFile
+ " contains the expected parameter: " + text,
content.isTextContent(text, type));
} else {
Assert.assertFalse(
"The tested pdf-document contain the expected parameter: "
+ text, content.isTextContent(text, type));
}
}
COM: <s> this assert method checks if the supposed parameters are not contained in the </s>
|
funcom_train/19060288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: //Internal method for now
public void setText(UCharacterIterator newText){
try{
UCharacterIterator newIter = (UCharacterIterator)newText.clone();
if (newIter == null) {
throw new InternalError("Could not create a new UCharacterIterator");
}
text = newIter;
reset();
}catch(CloneNotSupportedException e){
throw new InternalError("Could not clone the UCharacterIterator");
}
}
COM: <s> set the input text over which this tt normalizer tt will iterate </s>
|
funcom_train/25093755 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected AbstractAlgorithm createInnerAlgorithm(){
AbstractAlgorithm algoInstance;
try{
Constructor<? extends AbstractAlgorithm> ctor;
try{
ctor = innerAlgoClass.getConstructor(TransactionSet.class, Boolean.TYPE);
algoInstance = ctor.newInstance(workingGamma, isTight());
}catch (NoSuchMethodException e1){
ctor = innerAlgoClass.getConstructor(TransactionSet.class);
algoInstance = ctor.newInstance(workingGamma);
}
}catch (Exception e){
e.printStackTrace();
throw new UnsupportedOperationException("Can not instantiate " + innerAlgoClass.getName());
}
return algoInstance;
}
COM: <s> creates a instance of the given base algorithm inner algo class via reflection </s>
|
funcom_train/44621596 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public static class CheckJML extends MenuActions {
@Override
public final void run(final IAction action) {
// For now at least, only IResources are accepted for selection
try {
utils.checkSelection(selection,window,shell);
} catch (Exception e) {
utils.topLevelException(shell,"MenuActions.CheckJML",e);
}
}
}
COM: <s> this class implements the action for checking </s>
|
funcom_train/44286469 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getLastScheduledHours(Date dateStatus, Task task) {
int last = 0;
for (ForecastItem item: items) {
if (item.task == task && item.dateItem != null &&
!item.dateItem.after(dateStatus))
last = item.accumulatedHours + item.hours;
if (item.task == task && item.dateItem == null)
last = item.accumulatedHours;
}
return last;
}
COM: <s> returns the number of scheduled hours for the task at the specified date </s>
|
funcom_train/20483147 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void ontologiesChanged(List<? extends OWLOntologyChange> changes) throws OWLException {
if (active) {
for(OWLOntologyChange change : changes) {
if (change.getOntology().equals(ontology)) { //only monitor changes on this object's ontology
recordedChanges.add(change);
}
}
}
}
COM: <s> listener method that records changes as they are made </s>
|
funcom_train/34671439 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BigDecimal applyTo(BigDecimal value, int scale, int roundingMode) throws IllegalStateException {
if (nominator==null || denominator==null) {
throw new IllegalStateException("Rate not initialised");
}
return value.multiply(nominator).divide(denominator, scale, roundingMode);
}
COM: <s> apply this rate to a big decimal value </s>
|
funcom_train/19055738 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInvokeVarg(XInvokeVarg[] invokeVarg) {
this.invokeVarg_.clear();
for (int i = 0;i < invokeVarg.length;i++) {
addInvokeVarg(invokeVarg[i]);
}
for (int i = 0;i < invokeVarg.length;i++) {
invokeVarg[i].rSetParentRNode(this);
}
}
COM: <s> sets the xinvoke varg property b invoke varg b </s>
|
funcom_train/18459127 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void rollLeft() {
int temp[][] = new int[width][height];
for(int y = 0; y < height; y++) {
for(int x = 0; x < width; x++) {
temp[x][y] = imageIntArray[y*width+x];
}
}
for(int y = 0; y < height; y++) {
for(int x = 0; x < width; x++) {
setRGB(x, y, temp[(x+1)%width][y]);
}
}
dirty = true;
}
COM: <s> scrolls the image left one pixel with wrapping </s>
|
funcom_train/6318771 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLs(StorageClient sms,String baseURL, EndpointReferenceType smsEPR) throws Exception {
StorageManagement sm = (StorageManagement) makeProxy(StorageManagement.class,baseURL+UAS.SMS,smsEPR);
try {
GridFileType[] files = sms.listDirectory("/");
assertNotNull(files);
assertTrue(files.length>0);
for(int i=0;i<files.length;i++){
GridFileType file = files[i];
System.err.println("Get a file or dir "+file.getPath());
changePermission(sm, file);
}
}
catch(Exception e){
e.printStackTrace();
fail();
}
}
COM: <s> test list directory </s>
|
funcom_train/38335859 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JamochaValue getSlotValue(final int id) throws EvaluationException {
try {
return slots[id].value;
} catch (final ArrayIndexOutOfBoundsException e) {
String templName = null;
if (template != null)
templName = template.getName();
throw new EvaluationException("Error in getSlotValue, Template: "
+ templName + " Index does not exist: " + id, e);
}
}
COM: <s> method returns the value of the given slot at the id </s>
|
funcom_train/3561139 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() throws DbException {
Iterator it = databaseNameMap.keySet().iterator();
DbException te = null;
while (it.hasNext()) {
try {
DbDatabase db = (DbDatabase) it.next();
DbConnection con = db.getExistingThreadConnection();
if (con != null) {
con.close();
}
} catch (DbException e) {
te = e;
}
}
if (te != null) {
throw te;
}
}
COM: <s> close all connections associated with this database </s>
|
funcom_train/15891663 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeEmptySubgraphs() {
if(
(graphdict == null || graphdict.size() == 0)
&&
(nodedict == null || nodedict.size() == 0)
&&
(edgedict == null || edgedict.size() == 0)
) {
delete();
return;
}
if(graphdict != null) {
Enumeration enumer = graphdict.elements();
while(enumer.hasMoreElements()) {
((Subgraph)enumer.nextElement()).removeEmptySubgraphs();
}
}
}
COM: <s> delete this subgraph or any contained subgraph at any depth if the </s>
|
funcom_train/37769395 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GridModel getRelatedAttachmentWM() {
GridModel rows = (GridModel) getWidgetCache().getModel("relatedAttachment");
if (rows == null) {
rows = new GridModel();
populateRelatedAttachment(rows);
getWidgetCache().addModel("relatedAttachment", rows);
}
return rows;
}
COM: <s> getter for property attachment </s>
|
funcom_train/32756228 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setVisible ( final boolean visible ) {
super.setVisible( visible );
if ( !_splitPaneSet ) { // only set the divider location the first time it is shown
_splitPane.setDividerLocation( 0.4 );
_tableSplitPane.setDividerLocation( 0.5 );
_parametersSplitPane.setDividerLocation( 0.6 );
_splitPaneSet = true;
}
}
COM: <s> override this method to set the divider location of the split pane </s>
|
funcom_train/4124454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ImageIcon getScaledImageIcon(ImageIcon inputIcon, float scale) {
Image image = inputIcon.getImage();
return new ImageIcon(image.getScaledInstance(Math.round(image.getWidth(null) * scale),
Math.round(image.getHeight(null) * scale),
Image.SCALE_SMOOTH));
}
COM: <s> returns the scaled image icon </s>
|
funcom_train/47140992 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void show() {
/* System.err.println ("Entering menusheet.show in " + Thread.currentThread().getName());
try {*/
bVisible = true;
display();
/*}
finally {
System.err.println ("Leaving menusheet.show in " + Thread.currentThread().getName());
}*/
}
COM: <s> shows the menusheet </s>
|
funcom_train/51341234 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getChecksum(final ChecksumUtility checker) throws RootBlockException {
// the value stored in the root block.
final int storedChecksum = buf.getInt(OFFSET_CHECKSUM);
if (checker == null) {
log.info("Checksum not validated");
return storedChecksum;
}
// compute the checksum of the root block.
final int actualChecksum = calcChecksum(checker);
if (storedChecksum != 0) {
if (storedChecksum != actualChecksum) {
throw new RootBlockException("Checksum error");
}
}
return storedChecksum;
}
COM: <s> return the checksum store in the root block excluding only the field </s>
|
funcom_train/20894697 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compare(String source, String target) {
String[] ss = source.split("xx");
if (ss.length<2) return -1;
int num1 = Integer.parseInt(ss[1]);
ss = target.split("xx");
if (ss.length<2) return 1;
int num2 = Integer.parseInt(ss[1]);
return num1-num2;
}
COM: <s> the method parses the source and target strings </s>
|
funcom_train/24536580 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected List getSortedLeftEdges() {
if (sortedLeftEdges == null) {
sortedLeftEdges = new ArrayList(getChildrenXYBounds().size());
for (int i = 0; i < getChildrenXYBounds().size(); i++) {
Rectangle rect = (Rectangle) getChildrenXYBounds().get(i);
sortedLeftEdges.add(new Integer(rect.x));
}
Collections.sort(sortedLeftEdges);
}
return sortedLeftEdges;
}
COM: <s> return a sorted collection of ints representing the left edges of all components </s>
|
funcom_train/43665390 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addGClassesPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_GPackage_gClasses_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_GPackage_gClasses_feature", "_UI_GPackage_type"),
XmdlgenPackage.Literals.GPACKAGE__GCLASSES,
true,
false,
false,
null,
getString("_UI_GenerationModelPropertyCategory"),
null));
}
COM: <s> this adds a property descriptor for the gclasses feature </s>
|
funcom_train/26641613 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getValue(ConstantPool cp) {
String name;
if (getCachedConstantPool() == null) cachePool(cp);
if (cp == null) cp = getCachedConstantPool();
try {
name = ((UTFConstant)cp.get(nameIndex)).toString();
}
catch (Exception e) {
name = "<<invalid string constant>>";
}
return name;
}
COM: <s> lookup the string for this constant in the constant pool </s>
|
funcom_train/25332235 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCountCompounds() {
DAEnsemblDNASequenceReader instance = new DAEnsemblDNASequenceReader();
assertTrue(instance.countCompounds(Py)==0);
assertTrue(instance.countCompounds(Pu)==0);
String sequence = "ATCTATTG";
instance.setContents(sequence);
assertTrue(instance.countCompounds(Py)==5);
assertTrue(instance.countCompounds(Pu)==3);
}
COM: <s> test of count compounds method of class daensembl dnasequence reader </s>
|
funcom_train/49719699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isMgfFolder() {
boolean ret = false;
File folder = new File(mgfFolderPath);
if (folder.isDirectory()) {
File[] files = folder.listFiles(new FilenameFilter() {
public boolean accept(File arg0, String arg1) {
// TODO Auto-generated method stub
return arg1.endsWith(".mgf");
}
});
if (files.length > 0) {
ret = true;
this.files = files;
}
}
return ret;
}
COM: <s> must be excuted before the read fuction </s>
|
funcom_train/3360981 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Name addAll(int posn, List<Rdn> suffixRdns) {
unparsed = null;
for (int i = 0; i < suffixRdns.size(); i++) {
Object obj = suffixRdns.get(i);
if (!(obj instanceof Rdn)) {
throw new IllegalArgumentException("Entry:" + obj +
" not a valid type;suffix list entries must be of type Rdn");
}
rdns.add(i + posn, obj);
}
return this;
}
COM: <s> adds the rdns of a name in order at a specified position </s>
|
funcom_train/2629101 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void onAddSeekBarToDialogView(View dialogView, SeekBar seekBar) {
ViewGroup container = (ViewGroup) dialogView
.findViewById(R.id.seek_bar_container);
if (container != null) {
container.addView(seekBar, ViewGroup.LayoutParams.FILL_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT);
}
}
COM: <s> adds the seek bar widget of this preference to the dialogs view </s>
|
funcom_train/42461184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isEnabled() {
model.enterCriticalSection(Lock.READ);
try {
Statement s = resource.getProperty(SDV.disabled);
return s == null || s.getObject().isLiteral() && !s.getBoolean(); // either no disabled property or it is false
} catch (Exception e) {
log.error("Failed to get " + SDV.disabled + " from data source " + toString());
} finally {
model.leaveCriticalSection();
}
return false; // assume false on errors
}
COM: <s> returns false if data source has property disabled set to true </s>
|
funcom_train/18593800 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean assertFrameShowing(Hierarchy h, String id) {
try {
ComponentFinder finder = new BasicFinder(h);
return finder.find(new WindowMatcher(id, true)) != null;
}
catch(ComponentNotFoundException e) {
return false;
}
catch(MultipleComponentsFoundException m) {
// Might not be the one you want, but that's what the docs say
return true;
}
}
COM: <s> returns whether a window corresponding to the given string is </s>
|
funcom_train/1581464 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isOnLine(Point2D.Double point) {
if (this.lt == LineType.XPARALLEL) {
return (point.y == this.c);
} else if (this.lt == LineType.YPARALLEL) {
return (point.x == this.c * -1);
} else {
return (this.getYByX(point.x) == point.y);
}
}
COM: <s> check whether the given point is on this line </s>
|
funcom_train/50939999 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getAllDescendantFolder() {
List resultList = new ArrayList();
for (int i = 0; i < getChildCount(); i++) {
MessageFolder folder = getChildAt(i);
resultList.add(folder);
resultList.addAll(folder.getAllDescendantFolder());
}
return resultList;
}
COM: <s> get all the contained folder including subfolders </s>
|
funcom_train/42645859 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getLineThickness() {
// check for border style
if (borderStyle != null) {
return borderStyle.getStrokeWidth();
}
// check the border entry, will be solid or dashed
else if (border != null) {
if (border.size() >= 3) {
return border.get(2).floatValue();
}
}
return 0;
}
COM: <s> gets the line thickness assoicated with this annotation </s>
|
funcom_train/10590721 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void marshalFolderToSAX(Folder[] folders) {
try {
for (int i = 0; i < folders.length; i++) {
folderToSAX(this.contentHandler, folders[i]);
}
} catch (Exception e) {
getLogger().error("Cannot generate SAX events from folders", e);
}
}
COM: <s> emit folders as a sequence of sax events </s>
|
funcom_train/46759903 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RefModel getRef(final long refId, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
if (call.isStoreAudit()) {
BaseData.getSecurity().storeAudit(call.getUserRefId(), refId, "Viewed Ref", call);
}
return ReferenceData.getRef(refId, call);
}}; return (RefModel) call(method, call);
}
COM: <s> return the single ref model for the primary key </s>
|
funcom_train/48337593 | /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 (this == o) return true;
if (! (o instanceof Eval)) return false;
Eval other = (Eval)o;
return ( (name.equals(other.name))
&& (opcode == other.opcode)
&& (minArgs == other.minArgs)
&& (maxArgs == other.maxArgs));
}
COM: <s> determine whether this eval operator equals the specified </s>
|
funcom_train/39289146 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createPartControl(Composite parent) {
tabFolder = new TabFolder(parent, SWT.NONE);
propertyItem = new TabItem(tabFolder, SWT.NONE);
//TODO, It must change
TabItem item2 = new TabItem(tabFolder,SWT.NONE);
propertyItem.setText("Properties");
item2.setText("Description");
Composite defaultComposite = createDefaultComposite(tabFolder, SWT.PUSH);
propertyItem.setControl(defaultComposite);
createToolbar();
}
COM: <s> creates the swt controls for this workbench part </s>
|
funcom_train/7966427 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void changeState(EvPopulation<T> parameters) {
if (parameters.getBestResult().getObjectiveFunctionValue() > current_best) {
current_best = parameters.getBestResult().getObjectiveFunctionValue();
iterations_with_no_change = 0;
} else {
iterations_with_no_change++;
}
}
COM: <s> increment iteration counter </s>
|
funcom_train/26546561 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void newPacket (ChatPacketEvent e) {
// handle packet
try {
ChatPacket packet = handlePacket (e.sock, e.packet);
// route packet
route (e.sock, packet);
} catch (IOException ioe) {
System.out.println ("ChatManager: run (): " + ioe.getMessage ());
} catch (ChatPacketException cpe) {
System.out.println ("ChatManager: run (): " + cpe.getMessage ());
}
}
COM: <s> runs the chat manager one packet event at a time </s>
|
funcom_train/48189294 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void morefromuser(Class activity, int ActivityID) {
Intent intent = new Intent(this, activity);
intent.putExtra("viewSource", AppConstants.VIEWSOURCE_USER);
intent.putExtra("viewSearch", "" + authorId );
intent.putExtra("activityTitle", "" + authorName );
startActivityForResult(intent, ActivityID);
}
COM: <s> shows more work by the specific user </s>
|
funcom_train/49455263 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int aggregateCreationWrite(PreparedStatement ps, int nIn) throws SQLException {
final Iterator<AggregatedPositionValue> i = vector.iterator();
int n = nIn;
while (i.hasNext()) {
final AggregatedPositionValue apv = i.next();
n = apv.pvt.aggregateCreationWrite(ps, apv.nIter, n);
}
return n;
}
COM: <s> copy values into a prepared statement </s>
|
funcom_train/266232 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e) {
int x = calendarButton.getWidth()
- (int) popup.getPreferredSize().getWidth();
int y = calendarButton.getY() + calendarButton.getHeight();
Calendar calendar = Calendar.getInstance();
Date date = dateEditor.getDate();
if (date != null) {
calendar.setTime(date);
}
jcalendar.setCalendar(calendar);
popup.show(calendarButton, x, y);
dateSelected = false;
}
COM: <s> called when the jalendar button was pressed </s>
|
funcom_train/17805112 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addOperatingSystemPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Physical_OSComponent_OperatingSystem_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Physical_OSComponent_OperatingSystem_feature", "_UI_Physical_OSComponent_type"),
CtbPackage.Literals.PHYSICAL_OS_COMPONENT__OPERATING_SYSTEM,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the operating system feature </s>
|
funcom_train/25032835 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer strbuf = new StringBuffer();
strbuf.append("availableBytes=");
strbuf.append(availableBytes);
strbuf.append(" dec, byteIndex=");
strbuf.append(byteIndex);
strbuf.append(" dec, bitIndex=");
strbuf.append(bitIndex);
strbuf.append(" dec, decompressedValueCount=");
strbuf.append(decompressedValueCount);
strbuf.append(" dec");
return strbuf.toString();
}
COM: <s> p dump the current decoder state as a code string code </s>
|
funcom_train/43370540 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addLogRecord(LogRecord record) {
log.fine("adding record: " + record);
// check whether paused
if(status == STARTED) {
log.finer("status is started - adding to model");
logRecordPanel.addLogRecord(record);
loggerTree.addLogger(record.getLoggerName());
} else if(status == PAUSED){
log.finer("status is paused - adding to buffer");
pauseBuffer.add(record);
} else if(status == STOPPED) {
log.finer("status is stopped - ignoring message");
}
}
COM: <s> add a log record to the frame </s>
|
funcom_train/44074151 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String resolveCatalogName( DatabaseMetaData metaData, String catalog ) throws SQLException
{
ResultSet resultSet = metaData.getCatalogs();
String resolvedCatalog = null;
while (resultSet.next() )
{
String nextCatalog = resultSet.getString("TABLE_CAT");
if ( nextCatalog.equalsIgnoreCase( catalog ) )
{
resolvedCatalog = nextCatalog;
break;
}
}
resultSet.close();
if ( resolvedCatalog == null )
{
throw new SQLException("Could not find catalog '"+catalog+"' in DatabaseMetaData ");
}
return resolvedCatalog;
COM: <s> make sure the catalog name exists in the database and return the </s>
|
funcom_train/2501113 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void forwardToLoginPage(Request request, Response response, LoginConfig config) {
RequestDispatcher disp = context.getServletContext().getRequestDispatcher(config.getLoginPage());
try {
disp.forward(request.getRequest(), response.getResponse());
response.finishResponse();
} catch (Exception e) {
throw new AuthenticatorException("Unexpected error forwarding to login page", e);
}
}
COM: <s> called to forward to the login page </s>
|
funcom_train/42590139 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compare(PrimaryKey o1, PrimaryKey o2) {
int result=0;
if (o1.getColumnPos() == o2.getColumnPos() )
{
result = 0;
}
if (o1.getColumnPos() < o2.getColumnPos())
{
result = -1;
}
if (o1.getColumnPos() > o2.getColumnPos())
{
result = 1;
}
return result;
}
COM: <s> this method compares the given primary keys by their position </s>
|
funcom_train/40426862 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void saveRequestURL(HttpServletRequest hreq, HttpSession session) {
StringBuffer sb = new StringBuffer(hreq.getRequestURI());
if (hreq.getQueryString() != null) {
sb.append('?');
sb.append(hreq.getQueryString());
}
session.setAttribute(WebAccessControlUtil.KEY_JOSSO_SAVED_REQUEST_URI, sb.toString());
}
COM: <s> saves the original request url into our session </s>
|
funcom_train/3389660 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Environment setupEnv(Environment env) {
// In some cases, we go to some trouble to create the 'env' argument
// that is discarded. We should remove the 'env' argument entirely
// as well as the vestigial code that supports it. See comments on
// 'newEnvironment' in 'checkInternal' below.
return new Environment(toplevelEnv, this);
}
COM: <s> create an environment suitable for checking this class </s>
|
funcom_train/12835972 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAnyFailureFirstTrue() {
_support = new DispatcherSupport(DispatcherSupport.ANY_FAILURE, 2, _mainDispatcher);
_support.success(null);
assertNull(_mainResult);
_support.failure(null);
assertNotNull(_mainResult);
assertEquals(new Boolean(true), _mainResult);
}
COM: <s> tests any failure mode when first client succeeded but second failed </s>
|
funcom_train/40614051 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void recreateSessionState() {
if (sessionState != null && sessionState.size() > 0) {
sessionStateUpdating = true;
try {
for (String sql : sessionState) {
CommandInterface ci = prepareCommand(sql, Integer.MAX_VALUE);
ci.executeUpdate();
}
} finally {
sessionStateUpdating = false;
sessionStateChanged = false;
}
}
}
COM: <s> re create the session state using the stored session state list </s>
|
funcom_train/45121006 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IStatus validateFullVersionRangeText(boolean shortErrorMessage) {
IStatus status = validateVersion(getMinVersion(), fMinVersionText, shortErrorMessage);
if (status.isOK()) status = validateVersion(getMaxVersion(), fMaxVersionText, shortErrorMessage);
if (status.isOK()) status = validateVersionRange(shortErrorMessage);
return status;
}
COM: <s> short error messages are required for dialog status lines </s>
|
funcom_train/19274710 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void doSetChild(CHILD child, int index) {
for (int i = (this.components.size() - index); i >= 0; i--) {
this.components.add(null);
}
this.components.set(index, child);
if (child != null) {
child.setParent(this);
}
}
COM: <s> this method sets the code child code at the given code index code </s>
|
funcom_train/22425358 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getRowAmount(){
int iAmountRows = 0;
Repository repository = null;
for (int i=0; i<sAllFilenames.length; i++){
repository = ((Dataset) dAllFiles.get(i)).getRepository();
if(iAmountRows < repository.getNumRows())
iAmountRows = repository.getNumRows();
}
return iAmountRows;
}
COM: <s> function returns the amount of all rows which are in a datasource </s>
|
funcom_train/9480859 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void exiting(String sourceClass, String sourceMethod) {
if (!internalIsLoggable(Level.FINER)) {
return;
}
LogRecord record = new LogRecord(Level.FINER, "RETURN"); //$NON-NLS-1$
record.setLoggerName(this.name);
record.setSourceClassName(sourceClass);
record.setSourceMethodName(sourceMethod);
setResourceBundle(record);
log(record);
}
COM: <s> logs a message indicating that a method is exited </s>
|
funcom_train/8147011 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(Object data) {
if (data != null && !data.equals(getData())) {
setData(data);
// changed
synchronized (this.getVariableChangeListeners()) {
for (IVariableChangeListener l : this.getVariableChangeListeners()) {
logger .info(l.toString() + ".variableChanged(" +
getIdentifier() + ")");
l.variableChanged(getIdentifier());
}
}
}
}
COM: <s> update variable data should be done always in favor of creating new </s>
|
funcom_train/46488556 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void layoutContainer(Container t) {
//TODO - somehow actually apply the cellconstraints and use them to help layout
//System.out.println(m_constraints);
if (m_hold == null) return;
synchronized(t.getTreeLock()) {
int width = t.getWidth();
int height = t.getHeight();
Insets insets = t.getInsets();
m_hold.setSize(width, height);
m_hold.setBounds(insets.left, insets.top, width-insets.right-insets.left, height-insets.bottom-insets.top);
}
}
COM: <s> lays out given container constraints defined in </s>
|
funcom_train/9373419 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean processPendingRadioPowerOffAfterDataOff() {
synchronized(this) {
if (mPendingRadioPowerOffAfterDataOff) {
if (DBG) log("Process pending request to turn radio off.");
removeMessages(EVENT_SET_RADIO_POWER_OFF);
cm.setRadioPower(false, null);
mPendingRadioPowerOffAfterDataOff = false;
return true;
}
return false;
}
}
COM: <s> process the pending request to turn radio off after data is disconnected </s>
|
funcom_train/44448645 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int zcr(short[] frame) {
boolean wasNeg = (frame[0] <= 0);
int zcr = 0;
for (int i = 0; i < frame.length; i++) {
if (wasNeg && frame[i] > 0) {
zcr++;
wasNeg = false;
} else if (!wasNeg && frame[i] <= 0) {
zcr++;
wasNeg = true;
}
}
return zcr;
}
COM: <s> calculates the zero crossing rate of an audio frame </s>
|
funcom_train/12861492 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_DBOpenClose(){
Session session = HibernateUtil.openSession();
assertNotNull(session);
assertTrue(session.isOpen());
session = HibernateUtil.getCurrentSession();
assertNotNull(session);
session.beginTransaction();
session.close();
HibernateUtil.getSessionFactory().close();
}
COM: <s> testing if the returned session can be opened closed </s>
|
funcom_train/24117491 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JButton createJButton(String actionCommand, String urlIcon, String toolTipText) {
JButton button = new JButton();
button.setActionCommand(actionCommand);
button.setMargin(new Insets(2, 2, 2, 2));
button.addActionListener(this);
button.setIcon(new ImageIcon(getClass().getResource(urlIcon)));
button.setToolTipText(toolTipText);
return button;
}
COM: <s> creates a jbutton configuration it with the parametres of the method </s>
|
funcom_train/8039396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetSetContextPrinting() {
TTCCLayout layout = new TTCCLayout();
assertEquals(true, layout.getContextPrinting());
layout.setContextPrinting(false);
assertEquals(false, layout.getContextPrinting());
layout.setContextPrinting(true);
assertEquals(true, layout.getContextPrinting());
}
COM: <s> tests get context printing and set context printing </s>
|
funcom_train/17253930 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void draw(Text t) {
if (font == null) {
font = new LWJGLFont();
}
font.setColor(t.getTextColor());
applyStates(t.states);
font.print(this, (int) t.getWorldTranslation().x, (int) t
.getWorldTranslation().y, t.getWorldScale(), t.getText(), 0);
}
COM: <s> code draw code renders a text object using a predefined font </s>
|
funcom_train/50113162 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean checkTempDir() {
String tempDir = System.getProperties().getProperty("java.io.tmpdir");
File f = new File(tempDir);
if (f.exists()) {
TempMessageHolder.bufferMessages("Currrent Temp Dir Location: " + tempDir);
return createQdTemp(f);
} else {
return tempDirMissing(f);
}
}
COM: <s> check the existence of the temp directory </s>
|
funcom_train/37401036 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Displayable getDisplayableForElement(Element e) {
if (element == e) {
return this;
}
for (int i = 0; i < childs.length; i++) {
Displayable result = childs[i].getDisplayableForElement(e);
if (result != null) {
return result;
}
}
return null;
}
COM: <s> searches the displayable that represents a given element </s>
|
funcom_train/19216661 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String clipboardGet() {
Clipboard board = Toolkit.getDefaultToolkit().getSystemClipboard();
Transferable transfer = board.getContents(null);
if(transfer.isDataFlavorSupported(DataFlavor.stringFlavor)) {
try {
return (String)transfer.getTransferData(DataFlavor.stringFlavor);
} catch(Exception e) {
return "";
}
} else {
return "";
}
}
COM: <s> gets the content from the clipboard </s>
|
funcom_train/46395002 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double computeProb(final double mu, double x) {
double a = computeA(x), b = computeB(x);
//System.out.printf("computing cdf between %.2f and %.2f, x=%.2f\n", a, b, Math.toDegrees(x));
return Probability.normalCDF((b - mu) / sigma)
- Probability.normalCDF((a - mu) / sigma);
}
COM: <s> computes the probability as the area of the normals probability density </s>
|
funcom_train/2577048 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTickLabelFont(Comparable category, Font font) {
if (category == null) {
throw new IllegalArgumentException("Null 'category' argument.");
}
if (font == null) {
this.tickLabelFontMap.remove(category);
}
else {
this.tickLabelFontMap.put(category, font);
}
notifyListeners(new AxisChangeEvent(this));
}
COM: <s> sets the font for the tick label for the specified category and sends </s>
|
funcom_train/7463475 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testClassloaderOverride() {
DatabaseEntry entry = new DatabaseEntry();
SerialBinding binding = new CustomLoaderBinding
(catalog, null, new FailureClassLoader());
try {
binding.objectToEntry(new MyClass(), entry);
binding.entryToObject(entry);
fail();
} catch (RuntimeException e) {
assertTrue(e.getMessage().startsWith("expect failure"));
}
}
COM: <s> tests that overriding serial binding </s>
|
funcom_train/32734053 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isAvailable(int newPriority) {
if (isIdle()) {
return true;
} else if (this.getCurrentTask().getPatient() == null) {
return true;
} else if (this.getCurrentTask().getPatient().getPriority() < newPriority) {
return true;
} else {
return false;
}
}
COM: <s> determines if this unitary resource is available to treat a new patient </s>
|
funcom_train/33239495 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void zap(int y) {
for (int n = y; this.legalY(n); --n)
for (int m = 0; this.legalX(m); ++m)
this.data[m][n] = n == 0 ? 0 : this.data[m][n - 1];
}
COM: <s> remove a row and move everything down leaving the top row empty </s>
|
funcom_train/43245363 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetNOKOnePhoneNumber() {
System.out.println("setNOKOnePhoneNumber");
String nOKOnePhoneNumber = "";
EmergencyContactObject instance = new EmergencyContactObject();
instance.setNOKOnePhoneNumber(nOKOnePhoneNumber);
// 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 nokone phone number method of class org </s>
|
funcom_train/5165619 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void evolve(int a_numberOfEvolutions) {
for (int i = 0; i < a_numberOfEvolutions; i++) {
evolve();
}
if (m_activeConfiguration.isKeepPopulationSizeConstant()) {
keepPopSizeConstant(getPopulation(),
m_activeConfiguration.getPopulationSize());
}
}
COM: <s> evolves this genotype the specified number of times </s>
|
funcom_train/49123579 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insert(String roleId, String name, String authData, boolean allowDelete) {
Adminrole adminrole = new Adminrole(null, roleId, name, authData);
adminrole.setAllowdelete((allowDelete)? 1 : 0);
super.getHibernateTemplate().save( adminrole );
if (log.isInfoEnabled())
log.info("param[id=" + roleId + ", name=" + name + ", authData=" + authData + "]: insert successfully.");
}
COM: <s> insert the data </s>
|
funcom_train/48358263 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addAll(Collection<? extends E> collection) {
if (logger.isDebugEnabled()) {
logger.debug("ENTER addAll() collection size=" +
collection.size());
}
for (E ob : collection) {
this.add(ob);
}
if (logger.isDebugEnabled()) {
logger.debug("RETURN addAll() number of elements " +
numberElements);
}
return true;
}
COM: <s> adds the objects in the specified collection to this </s>
|
funcom_train/34595556 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadFromFile(InputStream file) {
try {
ObjectInputStream obj = new ObjectInputStream(file);
m_movesets = (MoveSet[])obj.readObject();
} catch (IOException e) {
e.printStackTrace();
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
}
COM: <s> load the move sets from an input stream </s>
|
funcom_train/8120849 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String requestMethod;
if (isInterCard)
requestMethod = "INCARD ";
else
requestMethod = ( isPost ? "POST " : "GET " );
return ( time + "\t" +
fromTID + " " +
nextTID + "\t" +
parentID + "\t" +
respCode + " " +
frameID + "\t" +
strLinkID + "\t" +
requestMethod +
strReplace + "\t" +
strQuery + "\n" );
} //
COM: <s> creates the string version of this log entry </s>
|
funcom_train/37230096 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element nextElement() {
iCurIndex++;
while( iCurIndex < nlData.getLength() && nlData.item(iCurIndex).getNodeType() != Node.ELEMENT_NODE ) {
iCurIndex++;
}
if( iCurIndex < nlData.getLength() )
return (Element)nlData.item( iCurIndex );
else
return null;
}
COM: <s> get the next element from the list </s>
|
funcom_train/41821640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int recoverWordAddress(int segmentAddress, int IndexAddress) {
// Calculate the correct address
final int lowerBits = IndexAddress;
final int higherBitsPosition = SEGMENT_SIZE_POWER + MemorySegment.WORD_POWER;
final int higherBitsSize = INT_SIZE_BITS - higherBitsPosition;
return BitOperations.writeBits(higherBitsPosition,
higherBitsSize, segmentAddress, lowerBits);
}
COM: <s> recoves the word aligned byte address from the segment address and the </s>
|
funcom_train/28340384 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean fit() {
boolean[] mask = new boolean[cosSinPair];
for(int i = 0; i < cosSinPair; i ++) {
mask[i] = params_incl[i];
a_err[i] = 0.;
}
updateParams();
boolean res = solver.solve(ds, mf, a, a_err, mask);
if (res) {
for(int i = 0; i < cosSinPair; i ++) {
params[i] = a[i];
params_err[i] = a_err[i];
}
}
return res;
}
COM: <s> perform one step of the data fit </s>
|
funcom_train/37102078 | /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 ("DirectoryManager".equals(portName)) {
setDirectoryManagerEndpointAddress(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/14015652 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean handleEvent(RequestControlContext context) {
TransitionableState currentState = getCurrentTransitionableState(context);
try {
return currentState.handleEvent(context);
} catch (NoMatchingTransitionException e) {
// try the flow level transition set for a match
Transition transition = globalTransitionSet.getTransition(context);
if (transition != null) {
return context.execute(transition);
// return transition.execute(currentState, context);
} else {
// no matching global transition => let the original exception
// propagate
throw e;
}
}
}
COM: <s> handle the last event that occurred against an active session of this flow </s>
|
funcom_train/7646451 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() throws IOException {
// BEGIN android-changed
synchronized (this) {
if (channel != null && channel.isOpen()) {
channel.close();
channel = null;
}
if (fd != null && fd.descriptor >= 0) {
fileSystem.close(fd.descriptor);
fd.descriptor = -1;
}
}
// END android-changed
}
COM: <s> closes this file </s>
|
funcom_train/13209335 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void drawPlayedCard(int x, int y, int percentSize, Card card, Graphics g) {
if (card!=null) {
Card activeCard = PartUtil.getActiveCard(card);
drawPart(x, y, percentSize, activeCard, g);
}
}
COM: <s> draws the played card </s>
|
funcom_train/49608710 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GuestReception updateGuestReception(String username,EntityManager em,GuestReception vo) throws Throwable {
try {
return (GuestReception)JPAMethods.merge(em, username, DefaultFieldsCallabacks.getInstance(), vo);
}
catch (Throwable ex) {
Logger.error(null, ex.getMessage(), ex);
throw ex;
}
finally {
em.flush();
}
}
COM: <s> update guest reception object </s>
|
funcom_train/18805151 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEquals() {
XYTextAnnotation a1 = new XYTextAnnotation("Text", 10.0, 20.0);
XYTextAnnotation a2 = new XYTextAnnotation("Text", 10.0, 20.0);
assertTrue(a1.equals(a2));
}
COM: <s> confirm that the equals method can distinguish all the required fields </s>
|
funcom_train/2760461 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addFlow(Flow flow) {
if(flow.getName() == null) {
throw new IllegalArgumentException("Flow does not contain a name");
}
if(_flowsByQName.containsKey(flow.getName())) {
throw new IllegalArgumentException("Cannot add flow("+flow.getName()+") twice.");
}
_flowsByQName.put(flow.getName(), flow);
}
COM: <s> adds a flow to this model </s>
|
funcom_train/19305467 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int computeInitialPD() {
int startingPD = 0;
if (isBlockArea()) {
startingPD = traitBorderBeforeWidth()
+ traitBorderAfterWidth()
+ traitPaddingBefore()
+ traitPaddingAfter();
} else {
startingPD = traitBorderStartWidth()
+ traitBorderEndWidth()
+ traitPaddingStart()
+ traitPaddingEnd();
}
return startingPD;
}
COM: <s> initialize the progression dimension for this area </s>
|
funcom_train/20788726 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StateMachine detachFrom(Component c) {
if(c instanceof RootPaneContainer) {
RootPaneContainer rootPane = (RootPaneContainer)c;
unregister(rootPane.getContentPane());
if(rootPane.getGlassPane() == null) return this;
rootPane.getGlassPane().removeMouseListener(this);
rootPane.getGlassPane().removeMouseWheelListener(this);
rootPane.getGlassPane().removeMouseMotionListener(this);
rootPane.getGlassPane().removeKeyListener(this);
} else {
unregister(c);
}
return this;
}
COM: <s> removes a component from the control of this state machine </s>
|
funcom_train/48397402 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString(){
String text="";
text += "[ ";
int weightSize = weight.length;
for (int i=0; i< weightSize; i++){
text += weight[i];
if(i < weightSize -1 ){
text += ", ";
}
}
text += " ]";
return text;
}
COM: <s> returns a string representation of the neuron model </s>
|
funcom_train/29806115 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public iCalendar iCalendarParser(java.lang.String iCalFilePath) {
File iCalFile = new File(iCalFilePath);
if (iCalFile.isFile())
{
iCalendarParser(iCalFile);
}
else
{
System.err.println("The input file is not a file! File provided:" + iCalFilePath);
ical = null;
}
return ical;
}
COM: <s> read i calendar from file </s>
|
funcom_train/34888440 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void waitBetweenRetry() {
try {
// Wait for SyncFlag to be true.
retrySyncFlag.waitUntilTrue(timeBetweenRetries);
} catch (InterruptedException e) {
errEntry.setThrowable(e);
errEntry.setAppContext("processorCall(node)");
logger.logError(errEntry);
}
}
COM: <s> wait for a period of time </s>
|
funcom_train/8096437 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected SingleIndex getIndex(String initial, int upper) {
SingleIndex result;
if (initial == null) {
result = new SingleIndex();
result.setSingleIndex("1");
result.setUpper(upper);
}
else {
result = new SingleIndex(initial);
result.setUpper(upper);
}
return result;
}
COM: <s> returns a configured single index </s>
|
funcom_train/16380284 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addMaxCorrectAnswersPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(new UnsettablePropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_McSubTaskDefType_maxCorrectAnswers_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_McSubTaskDefType_maxCorrectAnswers_feature", "_UI_McSubTaskDefType_type"),
CTEPackage.Literals.MC_SUB_TASK_DEF_TYPE__MAX_CORRECT_ANSWERS,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the max correct answers feature </s>
|
funcom_train/22545846 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(Uploader uploader) {
if ( !DATA_MODEL.contains(uploader) ) {
//attempt to update an existing uploader
int idx = DATA_MODEL.update(uploader);
if ( idx == -1 ) {
//if we couldn't find one to update, add it as new
_totalUploads++;
super.add(uploader);
}
}
}
COM: <s> override the default add </s>
|
funcom_train/18186046 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getRobertCross() {
if (robertCross == null) {
robertCross = new JMenuItem("Robert Cross");
robertCross.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
optionsPanel.removeAll();
ImageTransformation t = new RobertCrossTransformation();
optionsPanel.add(new TransformationEditor(t,img));
optionsPanel.updateUI();
jSplitPane.updateUI();
}
});
}
return robertCross;
}
COM: <s> this method initializes robert cross </s>
|
funcom_train/21437596 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeFragment(FragmentEntry _fe) {
if( _fe==null )
return false;
for( int i=0; i<fragments.size(); i++ ) {
if( fragments.elementAt(i).equals(_fe) ) {
fragments.removeElementAt(i);
return true;
}
}
return false;
}
COM: <s> remove the fragment entry from the collection </s>
|
funcom_train/17544292 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void doPerformAction() {
JavaSpacesField field = getCurrentField();
field.setName(((FieldWizardPanel1)(getPanels()[0])).getFieldsName());
field.setType(((FieldWizardPanel1)(getPanels()[0])).getFieldsType());
dObj.modelUpdatedFromUI();
updateView(field);
}
COM: <s> this method actually edits a field </s>
|
funcom_train/44162791 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startGame(Random random) {
Specification spec = getGame().getSpecification();
if (isEuropean() && !isREF()) {
modifyGold(spec.getIntegerOption(GameOptions.STARTING_MONEY)
.getValue());
((ServerEurope) getEurope()).initializeMigration(random);
getMarket().randomizeInitialPrice(random);
}
}
COM: <s> performs initial randomizations for this player </s>
|
funcom_train/22639340 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getLastModified() {
long mostRecentLastModified = 0;
for (Library library : libraries) {
if (library.isEnabled(arguments)) {
for(UniversalFile lib : library.getLibrary()) {
if (lib.getLastModified() > mostRecentLastModified) {
mostRecentLastModified = lib.getLastModified();
}
}
}
}
return mostRecentLastModified;
}
COM: <s> returns the most recent last modified date of all the libraries </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.