__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/39999696 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Scene onLoadScene() {
//this.mEngine.registerUpdateHandler(new FPSLogger());
this.mEngine.registerUpdateHandler(new IUpdateHandler(){
public void onUpdate(float pSecondsElapsed) {
levelHandler.updateLevelHandler();
}
public void reset() {
// TODO Auto-generated method stub
}
});
this.mainScene = loadScene();
this.createHowToMenu();
this.createPauseMenuScene();
this.createGameOverMenuScene();
this.createExitLevelMenuScene();
return this.mainScene;
}
COM: <s> called when the scene is being loaded </s>
|
funcom_train/16795840 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPixels(int channelNumber, FloatProcessor fp) {
float[] fPixels = (float[])fp.getPixels();
float value;
int size = width*height;
int shift = 16 - 8*channelNumber;
int resetMask = 0xffffffff^(255<<shift);
for (int i=0; i<size; i++) {
value = fPixels[i] + 0.5f;
if (value<0f) value = 0f;
if (value>255f) value = 255f;
pixels[i] = (pixels[i]&resetMask) | ((int)value<<shift);
}
}
COM: <s> sets the pixels of one color channel from a float processor </s>
|
funcom_train/10628288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBitLengthPositive1() {
byte aBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, 3, 91};
int aSign = 1;
BigInteger aNumber = new BigInteger(aSign, aBytes);
assertEquals(108, aNumber.bitLength());
}
COM: <s> bit length of a positive number </s>
|
funcom_train/48665412 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void refreshTableModel() {
setDescriptionText(null);
// reread data from model
ArtefactInfoContainer aic = fSessionData.getArtefactContainerForResource(fContext, true);
if(aic == null) {
logger.error("Couldn't find info container for: " + fContext);
getDataViewTableModel().setArtefacts(fContext, null);
} else {
getDataViewTableModel().setArtefacts(fContext,
aic.getDataViewInfo());
}
}
COM: <s> refreshes the data view table model </s>
|
funcom_train/21420239 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String isAllRequiredEASCAPElementsValid() throws Exception {
String result = null;
result = validateEASCAPParameters();
if (result.equalsIgnoreCase(VALID)) {
result = validateEASCAPGeoCode();
if (result.equalsIgnoreCase(VALID)) {
result = validateEASCAPEventCode();
}
}
return result;
}
COM: <s> make sure all eas cap required elements are valid </s>
|
funcom_train/3903777 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addObjectiveIDPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_PrimaryObjectiveType_objectiveID_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_PrimaryObjectiveType_objectiveID_feature", "_UI_PrimaryObjectiveType_type"),
ImsssPackage.Literals.PRIMARY_OBJECTIVE_TYPE__OBJECTIVE_ID,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the objective id feature </s>
|
funcom_train/14094998 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testResolveProperties2() {
m_xmlTestCase.addProperty("test", "a");
String s = "${test}";
String expectedReturn = "a";
String actualReturn = m_xmlTestCase.resolveProperties(s);
assertEquals("return value", expectedReturn, actualReturn);
}
COM: <s> test resolve properties </s>
|
funcom_train/42918351 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
return "Texture [" + textureID + ", " + width + ", " + height + ", " +
textureWidth + ", " + textureHeigth + ", " + widthRatio + ", " + heightRatio + "]";
}
COM: <s> returns a string representation of the image </s>
|
funcom_train/2905256 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected TreePath getLastChildPath(TreePath parent) {
if(treeModel != null) {
int childCount = treeModel.getChildCount
(parent.getLastPathComponent());
if(childCount > 0){
return parent.pathByAddingChild(treeModel.getChild
(parent.getLastPathComponent(), childCount - 1));
}
}
return null;
}
COM: <s> returns a path to the last child of code parent code </s>
|
funcom_train/21901760 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getAspectName(Class<?> iAspectClass) throws DesignerException {
try {
return (String) iAspectClass.getField("ASPECT_NAME").get(null);
} catch (Exception e) {
throw new DesignerException("Cannot get aspect name for " + iAspectClass.getSimpleName() + ": " + e.getMessage(), e
.getCause());
}
}
COM: <s> return the aspect name of the aspect </s>
|
funcom_train/3092591 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUp() {
List supportedList = new ArrayList();
Map unsupportedReasonMap = new HashMap();
pathList = new ArrayList();
modelA = new DummyModelA();
modelB = new DummyModelB();
modelC = new DummyModelC();
supportedList.add( DummyModelA.class );
unsupportedReasonMap.put( DummyModelB.class, "Reason" );
plugin = new BasicPlugin(
"Name",
"COW", //pathList,
supportedList,
unsupportedReasonMap,
new DummyView());
}
COM: <s> instantiates a basic plugin for testing as well as some dummy </s>
|
funcom_train/12180218 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void unselect() {
if (!this.isDisposed()) {
setSelected(false);
Control children [] = getChildren();
if (children != null) {
for (int i = 0; i < children.length; i++) {
((FormatComposite) children[i]).unselect();
}
}
}
}
COM: <s> unselect this format composite and all of its decendents </s>
|
funcom_train/37016250 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getIconURL(Resource base) {
String l_iconURL = "";
if (base == null) {
return l_iconURL;
}
try {
Literal l = (Literal) base.getProperty(VWE.iconUrl).getLiteral();
l_iconURL = l.getString();
} catch (RDFException e) {
e.printStackTrace();
}
return l_iconURL;
}
COM: <s> gets the icon url </s>
|
funcom_train/3891496 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void moveSelectedUp() {
StructuredSelection selection = (StructuredSelection)getSelection();
Object o = selection.getFirstElement();
if(o instanceof RestrictionType) {
/* boolean moved = _property.moveRestrictionUp((RestrictionType)o);
if(moved) {
refresh();
_property.getDataModel().setDirty(true); // set dirty
}*/
}
}
COM: <s> move the selected restriction type up one place </s>
|
funcom_train/39184290 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBioProcess(boolean contains, String name){
crit9CheckBox.setSelected(true);
crit9ComboBox.setSelectedIndex(contains?0:1);
crit9TextField.setText(name);
crit9ComboBox.setEnabled(true);
crit9TextField.setEnabled(true);
crit9Label.setEnabled(true);
}
COM: <s> changes the settings for the biological process criteria </s>
|
funcom_train/20553714 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Location getLocation() {
Location location = new Location();
try {
if (isConnected && isActive && currentInfo != null ) {
//location.parseGPGGA(currentInfo);
location.setRawMsg(currentInfo);
}
} catch (Throwable t) {
error = "get:" + t.toString();
close();
}
return location;
}
COM: <s> parses data from current sentence and return a location </s>
|
funcom_train/17681379 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void migrateDatabase() throws Exception {
String script = generateScript();
if (direct) {
JdbcConnectionSource conSrc =
((JdbcStorageManagerFactory)smf).getConnectionSource();
Connection con = null;
try {
runScript(con, script);
} finally {
if (con != null) {
try {
conSrc.returnConnection(con);
} catch (SQLException e) {
// ignore
}
}
}
}
}
COM: <s> migrate the given database if direct is false then just a script is </s>
|
funcom_train/19765491 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getGetLocation() {
if (getLocation == null) {//GEN-END:|41-getter|0|41-preInit
// write pre-init user code here
getLocation = new Command("\u6211\u7684\u4F4D\u7F6E", Command.ITEM, 0);//GEN-LINE:|41-getter|1|41-postInit
// write post-init user code here
}//GEN-BEGIN:|41-getter|2|
return getLocation;
}
COM: <s> returns an initiliazed instance of get location component </s>
|
funcom_train/25421789 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean remove(String value) {
if (!getIsCaseSensitive()) {
String sCheckedKey = checkKey(value);
if (_mapKeys.containsKey(sCheckedKey)) {
String sRemove = _mapKeys.remove(sCheckedKey);
return super.remove(sRemove);
} else {
return false;
}
} else {
return super.remove(checkValue(value));
}
}
COM: <s> removes a value from the collection </s>
|
funcom_train/49460617 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean ensureDateOk(Date d) throws EventDateInFutureException {
boolean future = false;
if (d != null && d.after(DateHelper.rollBackwards(DateHelper.now(), futureTolerance))) {
addDateInTheFuture(d);
future = true;
if (!importEventsInTheFuture)
throw new EventDateInFutureException("Event found for date in the future "+d+" (will not be imported");
}
return future;
}
COM: <s> checks if a date is in the future compared to now </s>
|
funcom_train/25064417 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createPanels() {
createShrinkContentAndSetExpandable();
if (isExpandable()) {
setActionLink(new ActionLink(getDisplay(), this));
addActionLinks();
createExpandPanel();
}
createShrinkPanel();
setCurrentContentPanel(isFullSize() ? getExpandContentPanel() : getShrinkContentPanel());
resetParentPanel();
}
COM: <s> builds the different components of the small and big panels </s>
|
funcom_train/28257391 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void displayPlayers() {
if (viewingPanel == null)
return;
for (int i = 0; i < tracks.getNumberOfTracks(); i++) {
Track track = tracks.getTrack(i);
if (track.isAvailable())
continue;
Player player = track.getPlayer();
String path = track.getMediaLocator().toString();
viewingPanel.addScreen(new File(path).getName(),
player,
ViewingPanel.DISPLAY_BOTH);
}
}
COM: <s> display all player view screens </s>
|
funcom_train/7371453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isEqual(Object other) {
if (other instanceof LogicalFieldSchema) {
LogicalFieldSchema ofs = (LogicalFieldSchema)other;
if (type != ofs.type) return false;
if (schema == null && ofs.schema == null) return true;
if (schema == null) return false;
else return schema.isEqual(ofs.schema);
} else {
return false;
}
}
COM: <s> equality is defined as having the same type and either the same schema </s>
|
funcom_train/37650740 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setSelectedWorkingSet(final IWorkingSet workingSet) {
selectedWorkingSet = workingSet;
selectedWorkingSetLabel.setText(
selectedWorkingSet == null
? getMessage(StringKeys.PROPERTY_LABEL_NO_WORKINGSET)
: getMessage(StringKeys.PROPERTY_LABEL_SELECTED_WORKINGSET) + selectedWorkingSet.getName());
deselectWorkingSetButton.setEnabled(selectedWorkingSet != null);
}
COM: <s> process the change of the selected working set </s>
|
funcom_train/29612070 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Object getListObj(PropertyValue val) throws BeansException {
if (val.getBeanRef() != null)
return instances.get(val.getBeanRef());
if (val.isNull())
throw new BeansException("There is a <null/> item in a list, which is illegal.");
return val.getValue();
}
COM: <s> looks it up as a bean ref or as a string </s>
|
funcom_train/44011387 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetEmpPhone() {
System.out.println("setEmpPhone");
String empPhone = "";
EmployeeBO instance = new EmployeeBO();
instance.setEmpPhone(empPhone);
// 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 emp phone method of class edu </s>
|
funcom_train/880637 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addHostPropertyDescriptorGen(Object object) {
itemPropertyDescriptors.add
(new LDAPItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_LDAPDirectory_host_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_LDAPDirectory_host_feature", "_UI_LDAPDirectory_type"),
LdapPackage.eINSTANCE.getLDAPDirectory_Host(),
true,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
}
COM: <s> this adds a property descriptor for the host feature </s>
|
funcom_train/2884403 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean add(int i){
boolean addOk = false;
if (i >= this.size()){
// resize
storage = this.createByteArray(i+1, storage);
}
int byteNbr = i / 8;
byte pos = (byte)(i % 8);
storage[byteNbr] = (byte)(storage[byteNbr] | (1 << pos));
addOk = true;
return addOk;
}
COM: <s> add bit at index i </s>
|
funcom_train/3068520 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removePolicy(int row){
PolicyFrameworkModel.PolicyData polData= (PolicyFrameworkModel.PolicyData)policyDataNotOverridden.get(row);
if(polData.isLocallyDefined){
policyFrameworkModel.changeLocalPolicy(polData.policyInst,PolicyFrameworkModel.DEFAULT_POLICY_CLS_POLICY_SLOT_NAME," ",null);
fireTableDataChanged();
}
return;
}
COM: <s> to remove a localy defined policy at specific row </s>
|
funcom_train/16435408 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setData(SSAccountingYear pAccountingYear) {
iId = pAccountingYear.iId;
iFrom = pAccountingYear.iFrom;
iTo = pAccountingYear.iTo;
iInBalance = pAccountingYear.iInBalance;
iVouchers = pAccountingYear.iVouchers;
iBudget = pAccountingYear.iBudget;
iPlan = pAccountingYear.iPlan;
}
COM: <s> sets the data of the accountingyear to the same as the parameter </s>
|
funcom_train/9637425 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void center(Frame owner) {
if (owner != null) {
Dimension frameSize = owner.getSize();
Dimension dialogSize = getPreferredSize();
Point framePos = owner.getLocationOnScreen();
setLocation(framePos.x
+ (frameSize.width / 2 - (dialogSize.width / 2)),
framePos.y
+ (frameSize.height / 2 - (dialogSize.height / 2)));
}
}
COM: <s> center dialog on main frame </s>
|
funcom_train/29779484 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isInterruptable() {
try {
lock.readLock().lock();
boolean result = interruptable;
if (!children.isEmpty()) {
for (MonitorInfo monitor : children) {
result = result && monitor.isInterruptable();
}
}
return result;
} finally {
lock.readLock().unlock();
}
}
COM: <s> return true if all the monitored method are interruptible false </s>
|
funcom_train/22101034 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEqualsSameInstanceOfMetricValueNone() {
assertEquals("The same instance of MetricValue.NONE should equal itself.",
MetricValue.NONE, MetricValue.NONE);
// equal instances should have comparable values
assertEquals(0, MetricValue.NONE.compareTo(MetricValue.NONE));
}
COM: <s> the exact same instance of metric value </s>
|
funcom_train/3359830 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reset() throws IOException {
if (markByteStack.empty()) {
return;
}
long pos = ((Long)markByteStack.pop()).longValue();
if (pos < flushedPos) {
throw new IIOException
("Previous marked position has been discarded!");
}
seek(pos);
int offset = ((Integer)markBitStack.pop()).intValue();
setBitOffset(offset);
}
COM: <s> resets the current stream byte and bit positions from the stack </s>
|
funcom_train/460546 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSha1String() throws Exception {
byte[] sha1 = getSha1();
StringBuffer buf = new StringBuffer();
for(int i=0; i<sha1.length; i++) {
String h = Integer.toHexString(sha1[i] & 0xff);
if(h.length() == 1) h = "0" + h;
buf.append(h);
}
return new String(buf);
}
COM: <s> getter for property sha1 string </s>
|
funcom_train/1546025 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long nextLong(long lower, long upper) {
if (lower >= upper) {
throw new NumberIsTooLargeException(LocalizedFormats.LOWER_BOUND_NOT_BELOW_UPPER_BOUND,
lower, upper, false);
}
double r = getRan().nextDouble();
return (long) ((r * upper) + ((1.0 - r) * lower) + r);
}
COM: <s> generate a random long value uniformly distributed between </s>
|
funcom_train/16604738 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void sortPoints() {
final ControlPoint firstPt = (ControlPoint)list.get(0);
final ControlPoint lastPt = (ControlPoint)list.get(list.size()-1);
Comparator compare = new Comparator() {
public int compare(Object first, Object second) {
if (first == firstPt) {
return -1;
}
if (second == lastPt) {
return -1;
}
float a = ((ControlPoint) first).pos;
float b = ((ControlPoint) second).pos;
return (int) ((a-b) * 10000);
}
};
Collections.sort(list, compare);
}
COM: <s> sort the control points based on their position </s>
|
funcom_train/45223376 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton makeDayTitle(String day) {
// JPanel newDay = new JPanel();
JButton dateButton = new JButton();
dateButton.setPreferredSize(preferredSizeDateButton);
dateButton.setText(day);
dateButton.setFont(f1);
dateButton.setEnabled(false);
// newDay.setBorder(loweredbevel);
// newDay.setPreferredSize(preferredSizeDayTitle);
// newDay.add(dateButton);
return dateButton;
}
COM: <s> make day title </s>
|
funcom_train/46860619 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getMnuitmSelectInverse() {
if (mnuitmSelectInverse == null) {
mnuitmSelectInverse = new JMenuItem();
mnuitmSelectInverse.setText("Select Inverse");
mnuitmSelectInverse.setIcon(new ImageIcon(getClass().getResource("/resources/icons/clear.png")));
mnuitmSelectInverse.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
SelectInverse();
}
});
}
return mnuitmSelectInverse;
}
COM: <s> this method initializes mnuitm select inverse </s>
|
funcom_train/8060135 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Integer lookup(String label) throws SymbolNotFoundException {
logger.debug("Looking for symbol " + label);
if(symbols.containsKey(label)) {
Integer line = symbols.get(label);
logger.debug("Symbol found at " + line);
return line;
} else {
throw new SymbolNotFoundException(label);
}
}
COM: <s> returns the address line number of the specified symbol declaration </s>
|
funcom_train/21493363 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean openFileDialog() {
FileDialog fd = new FileDialog(new Frame(),"Select the configuration file", FileDialog.LOAD);
fd.setFilenameFilter(new XMLFilenameFilter());
// since the above line does not work in (all versions of) IE, the next one is added
fd.setFile("*.xml");
fd.setVisible(true);
configFilename = fd.getDirectory() + fd.getFile();
return new File(configFilename).exists();
}
COM: <s> this function opens an open file dialog </s>
|
funcom_train/44507995 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void assertRealmsConfigured() throws IllegalStateException {
Collection<Realm> realms = getRealms();
if (realms == null || realms.isEmpty()) {
String msg = "Configuration error: No realms have been configured! One or more realms must be " +
"present to execute an authentication attempt.";
throw new IllegalStateException(msg);
}
}
COM: <s> used by the internal </s>
|
funcom_train/9742067 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean validateCheckdigit(String barcodeData) {
boolean result = false;
int barcodeSize = barcodeData.length();
if (barcodeSize >= 2) {
String base = barcodeData.substring(0, barcodeSize - 1);
String actual = barcodeData.substring(barcodeSize - 1, barcodeSize);
String correct = calcCheckdigit(base);
if (actual.equals(correct) == true) {
result = true;
}
}
return result;
}
COM: <s> method validate checkdigit </s>
|
funcom_train/22279706 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector keysVector() {
int i, vectCount;
Object key;
Vector vect;
if (count == 0)
return new Vector();
vect = new Vector(count);
vectCount = 0;
for (i = 0; i < keys.length && vectCount < count; i++) {
key = keys[i];
if (key != null) {
vect.addElement(key);
vectCount++;
}
}
return vect;
}
COM: <s> returns a vector containing the hashtables keys </s>
|
funcom_train/18513238 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void closeDisplay(XmlDisplay display) {
if (display == null) { return; }
refTable.removeRef(display);
if (refTable.getRefNumber(display) == 0) {
refTable.remove(display);
xmlEditor.getDtdFilesManager().closeFile(display.getDtdFile());
}
}
COM: <s> called when an xml display is closed </s>
|
funcom_train/26474867 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int doEnd() throws Exception {
Tag parent = this.getParent();
if (parent instanceof TableJSPTag) {
Table table = (Table) ((TableJSPTag) parent).getViewModel();
List list = (List) ViewModelManager.getValue(table, Identifier.parse(this.attribute));
if(list == null)
return SKIP_BODY;
for (Iterator iter = list.iterator(); iter.hasNext();) {
SelectionAction element = (SelectionAction) iter.next();
table.addSelectionAction(element);
}
}
return SKIP_BODY;
}
COM: <s> process the end tag </s>
|
funcom_train/12113859 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void connEtoC9(java.awt.event.ActionEvent arg1) {
try {
// user code begin {1}
// user code end
this.calcolaImponibileJButton_ActionPerformed(arg1);
// user code begin {2}
// user code end
} catch (java.lang.Throwable ivjExc) {
// user code begin {3}
// user code end
handleException(ivjExc);
}
}
COM: <s> conn eto c9 calcola imponibile jbutton </s>
|
funcom_train/50333145 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Consist addConsist(DccLocoAddress locoAddress){
if(consistList.contains(locoAddress)) // no duplicates allowed.
return consistTable.get(locoAddress);
log.debug("Add consist, address "+locoAddress);
NceConsist consist = new NceConsist(locoAddress, memo);
consistTable.put(locoAddress, consist);
consistList.add(locoAddress);
return consist;
}
COM: <s> add a new nce consist with the given address to </s>
|
funcom_train/7655236 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int valueOfBasicConstrains() {
Extension extn = getExtensionByOID("2.5.29.19"); //$NON-NLS-1$
BasicConstraints bc = null;
if ((extn == null)
|| ((bc = extn.getBasicConstraintsValue()) == null)) {
return Integer.MAX_VALUE;
}
return bc.getPathLenConstraint();
}
COM: <s> returns the value of basic constraints extension oid 2 </s>
|
funcom_train/25492842 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void listCars() {
Iterator<MobileNode> it = vehicles.iterator();
System.out.println("Cars on street (length=" + length + "): " + getEndNode().id + "->" + getStartNode().id);
while (it.hasNext()) {
MobileNode node = it.next();
System.out.println("\tNode " + node.id + " position=" + node.position + " speed=" + node.speed);
}
}
COM: <s> lists vehicles on this road </s>
|
funcom_train/10836490 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cleanup() {
if ( this.references != null ) {
final Iterator<ServiceReference> i = this.references.iterator();
while (i.hasNext()) {
final ServiceReference ref = i.next();
this.bundleContext.ungetService(ref);
}
this.references.clear();
}
if ( this.services != null ) {
this.services.clear();
}
}
COM: <s> clean up this instance </s>
|
funcom_train/44990069 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Release getRelease(String version) {
for (Iterator i=releases.iterator(); i.hasNext();) {
Release release = (Release)i.next();
if (release.getVersion() != null && release.getVersion().equals(version))
return release;
}
return null;
}
COM: <s> search for a specific release based on a version name </s>
|
funcom_train/20825287 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showFileOpenError(final ShowFileException e) {
JOptionPane.showMessageDialog(parent,
e.getMessage(),
NLS.get("showFileDialog.error"), //$NON-NLS-1$
JOptionPane.ERROR_MESSAGE,
null /*Icon icon*/);
}
COM: <s> popup dialog with file open error message </s>
|
funcom_train/22233235 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSensorCount(int count) {
Sensor[] tmp = new Sensor[count];
int i=0;
synchronized(sensors) {
int min = Math.min(count, sensorCount);
while(i < min) {
tmp[i] = sensors[i++];
}
while(i < count) {
tmp[i++] = null;
}
sensorCount = count;
sensorListChanged = true;
sensors = tmp;
}
notifyUsers();
}
COM: <s> set the number of sensor objects per physical environmnet </s>
|
funcom_train/46440346 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute() {
final GradingStatistics stats = (GradingStatistics) context.get(AcmeConstants.stats.name());
final Float average = (float) stats.getTotalScore().intValue() / (float) stats.getExamCount().intValue();
System.out.println("The class average for " + stats.getExamCount() + " students: " + average);
}
COM: <s> computes the class average and echos it to the console </s>
|
funcom_train/43145008 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void disconnectClient() {
try {
if (client != null) {
client.close();
}
} catch (IOException e) {
System.out.println("IOException in FlightGearGpsReceiver::disconnectClient(): " + e.getMessage());
}
finally {
client = null;
}
}
COM: <s> disconnects the connection to the client </s>
|
funcom_train/26456779 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Object throwIllegalArgumentException(char[] query, String message) {
throw new IllegalArgumentException(message + " for query: " + new String(query));
}
/**
* Add another segment to the segments array.
*/
private void add(QuerySegment qs) {
if (segmentsIdx == segments.length-1) {
COM: <s> always throws illegal argument exception </s>
|
funcom_train/22362535 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isSwitchingObject(Object o) {
Object o1 = getParameter(0, o);
Object o2 = getParameter(1, o);
if((o1 != null) && (o2 != null)) {
int i = -1;
if(ignoreCase) {
i = o1.toString().toUpperCase().indexOf(o2.toString().toUpperCase());
} else {
i = o1.toString().indexOf(o2.toString());
}
return i >= 0;
}
return false;
}
COM: <s> checks the following two elements and evaluates their replacements </s>
|
funcom_train/13935735 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAttributes(WorldEntity p, String realname, String first, String second) {
PgAttributes pgatt=new PgAttributes();
PgIdentity pgid=new PgIdentity();
pgid.setFirst(first);
pgid.setSecond(second);
pgid.setUniqueId(p.getId());
pgatt.setRealname(realname);
//Set as real and current id
pgatt.setRealId(pgid);
pgatt.setCurrentid(pgid);
p.addData(PgAttributes.ID,pgatt);
}
COM: <s> set the real initial id of the player </s>
|
funcom_train/7882277 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setDirectorySelected(boolean directorySelected) {
super.setDirectorySelected(directorySelected);
JFileChooser chooser = getFileChooser();
if(directorySelected) {
approveButton.setText(directoryOpenButtonText);
approveButton.setToolTipText(directoryOpenButtonToolTipText);
approveButton.setMnemonic(directoryOpenButtonMnemonic);
} else {
approveButton.setText(getApproveButtonText(chooser));
approveButton.setToolTipText(getApproveButtonToolTipText(chooser));
approveButton.setMnemonic(getApproveButtonMnemonic(chooser));
}
}
COM: <s> property to remember whether a directory is currently selected in the ui </s>
|
funcom_train/45552833 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LanguageParms getLanguageParms() {
LanguageParms lp = new LanguageParms();
lp.setLangMap(Language.getLanguageMap());
lp.setBlockStart(Language.blockStart);
lp.setBlockEnd(Language.blockStop);
lp.setPromptPre(language);
lp.setPromptSuf(">");
return lp;
}
COM: <s> returns the language parameters that will be used on the client for </s>
|
funcom_train/27904305 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void evalInputs(Node node) {
String value = node.getValue();
if(value.equals("inputs")) {
Node input = node.getChild("input");
Node more = node.getChild("moreInputs");
evalInput(input);
evalMoreInputs(more);
}
else {
syntaxError(node,"evalInputs()");
}
}
COM: <s> evaluates an inputs production </s>
|
funcom_train/13722014 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPopupMenu getMnuColumns() {
if (mnuColumns == null) {
mnuColumns = new JPopupMenu();
mnuColumns.add(getMnuColumnRename());
mnuColumns.add(getMnuColumnAddLeft());
mnuColumns.add(getMnuColumnAddRight());
mnuColumns.add(getMnuColumnDelete());
mnuColumns.add(getMnuRowAdd());
mnuColumns.add(getMnuRowDelete());
}
return mnuColumns;
}
COM: <s> this method initializes mnu columns </s>
|
funcom_train/28750974 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSetid(Long newVal) {
if ((newVal != null && this.setid != null && (newVal.compareTo(this.setid) == 0)) ||
(newVal == null && this.setid == null && setid_is_initialized)) {
return;
}
this.setid = newVal;
setid_is_modified = true;
setid_is_initialized = true;
}
COM: <s> setter method for setid </s>
|
funcom_train/37168026 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addImage(String key, Image image) {
if (!Utils.isThisThreadSWT()) {
Debug.out("addImage called on non-SWT thread");
return;
}
ImageLoaderRefInfo existing = mapImages.putIfAbsent(key,
new ImageLoaderRefInfo(image));
if (existing != null) {
// should probably fail if refcount > 0
existing.setImages(new Image[] {
image
});
existing.addref();
}
}
COM: <s> adds image to repository </s>
|
funcom_train/39125191 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelected(Collection<? extends T> list) {
for (T t : selectedList) {
t.setSelected(false);
}
selectedList.removeAllElements();
selectionStartTick = -1;
focus=null;
for (T item : list)
item.setSelected(true);
selectedList.addAll(list);
if (list.size() !=0 ) setFocus(focus=list.iterator().next());
// notifyListeners();
project.setSelectionFocus(this);
dirty=true;
}
COM: <s> clear then add multiple items to the selection </s>
|
funcom_train/37390218 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setThrowables(Hashtable throwables) {
if (throwables != null) {
Enumeration enum2 = throwables.elements();
int count = 0;
exceptions = new CReferenceType[throwables.size()];
while (enum2.hasMoreElements()) {
exceptions[count++] = ((CThrowableInfo)enum2.nextElement()).getThrowable();
}
}
}
COM: <s> this method is used by initializers that knows throwables exceptions only </s>
|
funcom_train/27792983 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean preprocess(String[] anArgs) {
// run the preprocessor to handle inheritance first.
antlr.preprocessor.Tool preTool = new antlr.preprocessor.Tool(this,
anArgs);
if (preTool.preprocess()) {
fPreprocessedArgs = preTool.preprocessedArgList();
} else {
fPreprocessedArgs = null;
hasError = true;
}
return hasError;
}
COM: <s> perform preprocessing on the grammar file </s>
|
funcom_train/36147394 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean retainAll(Collection<?> c) {
boolean anyRemoved = false;
Iterator<HandlerType> iter = this.iterator();
while( iter.hasNext() )
{
if( !c.contains(iter.next()))
{
iter.remove();
anyRemoved = true;
}
}
return anyRemoved;
}
COM: <s> removes all handlers but the ones in a collection from the invocation chain </s>
|
funcom_train/1242038 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getExtension(Operation operation) {
GetFeatureType request = (GetFeatureType) OwsUtils.parameter(operation.getParameters(),
GetFeatureType.class);
String outputFormat = request.getOutputFormat().toUpperCase();
// DXF
if (outputFormat.equals("DXF"))
return "dxf";
// DXF-ZIP
return "zip";
}
COM: <s> gets current request extension dxf or zip </s>
|
funcom_train/26334669 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: +" public void set_order_clause(String order) \n"
+" { if ( order != null) \n"
+" { \n"
+" order_clause = new String( order); \n"
+" } \n"
+" else \n"
+" { \n"
+" order_clause = null; \n"
+" } \n"
+" set_select_st(); \n"
+"\n"
+" } \n\n"
COM: <s> sets order clause allows rder or group conditions to be added n </s>
|
funcom_train/18729867 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Edge edge(double length) {
Vertex origin = getOrigin();
Vertex direction = getDirection().copy();
direction.scaleIt(length);
Vertex from = origin.minus(direction);
Vertex to = origin.add(direction);
Edge constructor = new Guide(from, to);
constructor.setStrippled(true);
return constructor;
}
COM: <s> return an edge for this line </s>
|
funcom_train/20978667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getProperty(String key, int defaultValue) {
if (this.ignoreCase) {
key = key.toUpperCase();
}
String val = this.attributes.getProperty(key);
if (val == null) {
return defaultValue;
} else {
try {
return Integer.parseInt(val);
} catch (NumberFormatException e) {
throw this.invalidValue(key, val, this.lineNr);
}
}
}
COM: <s> returns an integer property of the object </s>
|
funcom_train/47535834 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
if (m_queuedTurns[0] == null) {
if (canRun()) { // can we run?
showMessage("Got away safely!");
endBattle(1);
} else {
showMessage("Can't escape!");
try {
queueMove(0, BattleTurn.getMoveTurn(-1));}
catch (MoveQueueException e) {
// we're screwed
e.printStackTrace();
}
}
}
}
COM: <s> called when the trainer runs from battle </s>
|
funcom_train/35249940 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Writer openWriter() {
return new Writer() {
public void flush() {}
public void close(){}
public Writer append(CharSequence csq) throws IOException {
contents.append(csq);
return this;
}
public void write(char[] cbuf, int off, int len) throws IOException {
contents.append(cbuf,off,len);
}
};
}
COM: <s> return a writer for writing to the contents of this source file </s>
|
funcom_train/42010477 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getDocumentCount() {
long res = 0;
try {
pm.connect();
ManagementDB managementDB = new ManagementDB(pm.getSqlConnection());
res = managementDB.getDocumentCount();
} catch (Exception ex) {
Logger.getLogger(IndexerStatics.class.getName()).log(Level.WARNING, null, ex);
}
return res;
}
COM: <s> get the total documents indexed in the db </s>
|
funcom_train/8639548 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Image getImage() throws BadElementException {
paintCode();
byte g4[] = CCITTG4Encoder.compress(outBits, bitColumns, codeRows);
return Image.getInstance(bitColumns, codeRows, false, Image.CCITTG4, (options & PDF417_INVERT_BITMAP) == 0 ? 0 : Image.CCITT_BLACKIS1, g4, null);
}
COM: <s> gets an code image code with the barcode </s>
|
funcom_train/9086765 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(Offices entity) {
EntityManagerHelper.log("deleting Offices instance", Level.INFO, null);
try {
entity = getEntityManager().getReference(Offices.class,
entity.getId());
getEntityManager().remove(entity);
EntityManagerHelper.log("delete successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("delete failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> delete a persistent offices entity </s>
|
funcom_train/14388050 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void skipComment() throws IOException {
int dashesToRead = 2;
while (dashesToRead > 0) {
char ch = this.readChar();
if (ch == '-') {
dashesToRead -= 1;
} else {
dashesToRead = 2;
}
}
if (this.readChar() != '>') {
throw this.expectedInput(">");
}
}
COM: <s> skips a comment </s>
|
funcom_train/36950521 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void openParent(Object info, HashMap newElements, IProgressMonitor pm) throws RubyModelException {
Openable openableParent = (Openable) getOpenableParent();
if (openableParent != null && !openableParent.isOpen()) {
openableParent.generateInfos(openableParent.createElementInfo(), newElements, pm);
}
}
COM: <s> open the parent element if necessary </s>
|
funcom_train/43327946 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void paintVectorAt(int x, int y, DVector v, Graphics g) {
if (minZ==maxZ)
g.setColor(Color.black);
else {
double scaledZ = (v.data[2] - minZ) / (maxZ - minZ);
g.setColor(colorScale.colorOf(scaledZ));
}
ptype.paintPointAt(x,y,g);
}
COM: <s> this is a function to put a dot wherever a point should </s>
|
funcom_train/32051894 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void copyScenario() {
outputWriter.startScenario(mergeReader.currentScenarioName());
while (mergeReader.hasMetrics()) {
final MergeMetric mergeMetric = mergeReader.nextMetric();
outputWriter.startMetric(mergeMetric);
while (mergeReader.hasMetricValues()) {
outputWriter.writeMetricValue(mergeReader.nextMetricValue());
}
}
}
COM: <s> copies a scenario from merge souce to output </s>
|
funcom_train/29398011 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setFieldValue(String fieldName, Object obj) {
if (data == null || fieldName == null || obj == null)
return false;
boolean found = false;
for (int i = 0; i < fieldNames.length; i++) {
if (fieldName.equals(fieldNames[i])) {
found = true;
break;
}
}
if (!found)
return false;
data.put(fieldName, obj);
return true;
}
COM: <s> sets a given field in the internal hashtable to the given value </s>
|
funcom_train/49421527 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetAnalyzer() {
AnalyzerFactory factory = new BasicAnalyzerFactory(null);
assertNotNull("No standard analyzer is set up", factory.getAnalyzer());
factory = new BasicAnalyzerFactory(
"org.apache.lucene.analysis.standard.StandardAnalyzer");
assertNotNull("Standard analyzer class is not recognised", factory
.getAnalyzer());
}
COM: <s> test method for </s>
|
funcom_train/25329423 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void regenerateSession(HttpServletRequest request) {
QlueSession qlueSession = getQlueSession(request);
QluePageManager pageManager = (QluePageManager) request.getSession()
.getAttribute(QlueConstants.QLUE_SESSION_PAGE_MANAGER);
request.getSession().invalidate();
request.getSession(true).setAttribute(
QlueConstants.QLUE_SESSION_OBJECT, qlueSession);
request.getSession().setAttribute(
QlueConstants.QLUE_SESSION_PAGE_MANAGER, pageManager);
}
COM: <s> invalidates the existing session and creates a new one preserving the </s>
|
funcom_train/29290065 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SupportCMPData findByPrimaryKey(String support_id) throws EJBException {
SupportCMPData supportData = new SupportCMPData();
try {
SupportCMPLocal supportLocal = getSupportCMPLocalHome().findByPrimaryKey(support_id);
supportData.setTitle(supportLocal.getTitle());
supportData.setInformation(supportLocal.getInformation());
} catch (FinderException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return supportData;
}
COM: <s> get support to update </s>
|
funcom_train/48406459 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addUsedActivityPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Activity_usedActivity_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Activity_usedActivity_feature", "_UI_Activity_type"),
SpemxtcompletePackage.eINSTANCE.getActivity_UsedActivity(),
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the used activity feature </s>
|
funcom_train/46761949 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FrequencyModel getFrequency(final long frequencyId, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
if (call.isStoreAudit()) {
BaseData.getSecurity().storeAudit(call.getUserRefId(), frequencyId, "Viewed Frequency", call);
}
return SchedulingData.getFrequency(frequencyId, call);
}}; return (FrequencyModel) call(method, call);
}
COM: <s> return the single frequency model for the primary key </s>
|
funcom_train/3360892 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if ((obj != null) && (obj instanceof Reference)) {
Reference target = (Reference)obj;
// ignore factory information
if (target.className.equals(this.className) &&
target.size() == this.size()) {
Enumeration mycomps = getAll();
Enumeration comps = target.getAll();
while (mycomps.hasMoreElements())
if (!(mycomps.nextElement().equals(comps.nextElement())))
return false;
return true;
}
}
return false;
}
COM: <s> determines whether obj is a reference with the same addresses </s>
|
funcom_train/35725353 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void highlight(Tool tool) {
int i;
for (i = 0; i < list.size(); ++i) {
if ( tool.equals((Tool) list.get(i)) ) {
actual = (Tool)list.get(i);
actNum = i;
return ;
} else {
actual = null;
}
}
}
COM: <s> highlights a tool for future usage </s>
|
funcom_train/48975900 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stop() {
if (sequencer != null && seq != null) {
isLooping = false;
if (!sequencer.isRunning()) {
sequencer.start();
}
sequencer.setTickPosition(sequencer.getTickLength());
// move to the end of the sequence to trigger an end-of-track msg
}
}
COM: <s> stop the sequence </s>
|
funcom_train/21606278 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void destroyDefinition(BeanFactory groupDef, String selector) {
if (groupDef instanceof ConfigurableBeanFactory) {
if (logger.isTraceEnabled()) {
logger.trace("Factory group with selector '" + selector +
"' being released, as there are no more references to it");
}
((ConfigurableBeanFactory) groupDef).destroySingletons();
}
}
COM: <s> destroy definition in separate method so subclass may work with other definition types </s>
|
funcom_train/21507733 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void reset(String newName, Vector3f pos, Quaternion orientation, float speed, float lifeTime, float damage) {
name = newName;
projectileNode.setName(name + "ProjectileNode");
projectileSpeed = speed;
projectileLifeTime = lifeTime;
projectileDamage = damage;
if(pos != null) projectileNode.getLocalTranslation().set(pos);
if(orientation != null) projectileNode.getLocalRotation().set(orientation);
reset();
}
COM: <s> used by the manager class to reset when recycled </s>
|
funcom_train/22222596 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int calcColumnsHash() {
int retHash = -1;
if ( this.attData!=null ) {
StringBuffer columnsList = new StringBuffer(100);
Iterator it = this.attData.keySet().iterator();
while (it.hasNext()) {
columnsList.append(it.next());
}
retHash = columnsList.toString().hashCode();
}
return retHash;
}
COM: <s> calculate hash value for table structure </s>
|
funcom_train/9072516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getProcessedValue(String string) {
// Check for turned-off trimming
if (!VisualisationSettings.trimLongNames)
return string;
String newString = string;
int length = newString.length();
if (length > 20) {
newString = string.substring(0, 8) + "..."
+ string.substring(length - 9, length);
}
return newString.replace("\n", "\\n");
}
COM: <s> processes the string value by trimming the middle of the string if the </s>
|
funcom_train/37508542 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void askForSaving() {
AlbumPanelCtrl ctrl = m_ctrlFullServicePanel.getAlbumPanelCtrl();
if (ctrl.isModified()) {
if (JOptionPane.showConfirmDialog(m_frame,
"Current album is modified.\n" +
"Should I save it?",
"Confirmation",
JOptionPane.YES_NO_OPTION) ==
JOptionPane.YES_OPTION) {
save();
}
}
}
COM: <s> checks if the current album is modified </s>
|
funcom_train/19624996 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mousePressed(int button, int mx, int my) {
if(mx >= x && mx <= x + width && my >= y && my <= y + height) {
//checked = !checked;
if (parent instanceof LobbyState) {
((LobbyState)parent).focusBox(this);
}
if (parent instanceof ChatLobbyState)
((ChatLobbyState)parent).focusBox(this);
}
}
COM: <s> checks if a click was on the box </s>
|
funcom_train/32055848 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CellView createMapping(Object obj) {
CellView cellview = graphLayoutCache.getMapping(obj, false);
CellView cellview1 = graphLayoutCache.getFactory().createView(obj, this);
if(cellview != null) {
cellview1.setAttributes(GraphConstants.cloneMap(cellview.getAllAttributes()));
cellview1.refresh(false);
}
return cellview1;
}
COM: <s> create a mapping </s>
|
funcom_train/13886560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void caseAPathFeatureEq(APathFeatureEq node) {
node.getLeft().apply(this);
String[] leftFeaturePath = new String[featurePath.length];
System.arraycopy(featurePath, 0,
leftFeaturePath, 0,
featurePath.length);
node.getRight().apply(this);
ExpressionId eq = JcExpressionId.getInstance(JcSymbolTypes.UNIFY_EQ_TYPE,
new Object[]{ leftFeaturePath,
featurePath });
eqList.add(eq);
}
COM: <s> extraction of a feature equation between two feature paths </s>
|
funcom_train/20313381 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testShortestPath5() {
Property p = m_model.createProperty( NS + "p" );
m_a.addProperty( p, m_a );
testPath( OntTools.findShortestPath( m_model, m_a, m_a, Filter.any ),
new Property[] {p} );
}
COM: <s> reflexive loop is allowed </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.