__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/49410774 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String isDocId(String identifier) throws IndexException {
for (Iterator<Identifier> i = idx.iterator(); i.hasNext();) {
Identifier id = i.next();
if (id.getRecordId().equals(identifier))
return id.getDatestamp();
}
return null;
}
COM: <s> determine if current identifier is a record identifier </s>
|
funcom_train/3724133 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void zoomBestSize() {
visibleRegion.putStart("x", getStartMin("x"));
visibleRegion.putStart("y", getStartMin("y"));
visibleRegion.putEnd("x", getEndMax("x"));
visibleRegion.putEnd("y", getEndMax("y"));
refreshAll();
}
COM: <s> this methode do a zoom to see all the </s>
|
funcom_train/8407255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List subList(int i, int j) {
if(i < 0 || j > _size || i > j) {
throw new IndexOutOfBoundsException();
} else if(i == 0 && j == _size) {
return this;
} else {
return new CursorableSubList(this,i,j);
}
}
COM: <s> returns a fail fast sublist </s>
|
funcom_train/43245361 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIsAddressAvailable() {
System.out.println("isAddressAvailable");
FamilyDemographicDependentObject instance = new FamilyDemographicDependentObject();
boolean expResult = true;
boolean result = instance.isAddressAvailable();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of is address available method of class org </s>
|
funcom_train/25312079 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void recomputeUp(Tree tree) {
pSum = left.getPSum() + right.getPSum();
wMax = Math.max(left.getWMax(), right.getWMax());
wSum = left.getWSum() + right.getWSum();
// recursion until we reach the root node.
if (parent != null)
parent.recomputeUp(tree);
}
COM: <s> this function is used to recompute the attributes of all nodes </s>
|
funcom_train/50433505 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int nextInt(int a, int b) {
debug.assert(a < b,
"failed a < b - a and b are a range of values from a to b");
double r = super.nextDouble();
r *= (b - a + 1);
r += a;
r = Math.floor(r);
if (r > b) {
r = b;
}
return ((int) r);
} // of random
COM: <s> get a random integer x such that a x b inclusive </s>
|
funcom_train/18744231 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInnerText(String text) {
testFixed(false);
this.innerText = text;
if (text.length() > 0 && this.nodeOnly != null) {
addError("Aspect %s cannot have label text %s", this.nodeOnly, text);
}
setFixed();
}
COM: <s> sets the label text to a non </s>
|
funcom_train/45895530 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void doButtonAnimations() {
for (AnimatedRadioButton arb : leftButtons) {
if (arb.selected) {
arb.animationIndex = (arb.animationIndex + 1) % (arb.phases.length - 1);
}
}
for (AnimatedRadioButton arb : rightButtons) {
if (arb.selected) {
arb.animationIndex = (arb.animationIndex + 1) % (arb.phases.length - 1);
}
}
askRepaint();
}
COM: <s> animate selected buttons </s>
|
funcom_train/46790196 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addNode(int index, PDPageNode newNode) {
COSArray cosKids = cosGetField(DK_Kids).asArray();
if (cosKids == null) {
cosKids = COSArray.create();
cosSetField(DK_Kids, cosKids);
}
index = Math.min(index, cosKids.size());
if (index < 0) {
index = cosKids.size();
}
newNode.setParent(this);
cosKids.add(index, newNode.cosGetDict());
incrementCount(newNode.getCount());
}
COM: <s> add a page after at the designated index </s>
|
funcom_train/31648285 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String generateStatement(int operation) {
StringBuffer buffer = new StringBuffer();
switch(operation){
case OP_ADD_INTO_TABLE:
buffer.append("ALTER TABLE "+this.table.getName()+" ADD COLUMN ");
buffer.append(this.generateStatement(OP_CREATE_WITH_TABLE));
return buffer.toString();
default:
return super.generateStatement(operation);
}
}
COM: <s> overload the method to provide sql statement specified for hsql </s>
|
funcom_train/7368301 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean get(final int bitIndex) {
if ((bitIndex < 0) || (bitIndex > bitNum)) { throw new IndexOutOfBoundsException("" + bitIndex); }
final int blockIndex = BitSet.blockIndex(bitIndex);
return ((bits[blockIndex] & BitSet.bit(bitIndex)) != 0);
}
COM: <s> returns the value of the bit with the specified index </s>
|
funcom_train/4922271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInitialState() {
assertEquals("Incorrect initial method", "",
this.httpRequestParser.getMethod());
assertEquals("Incorrect initial request URI", "",
this.httpRequestParser.getRequestURI());
assertEquals("Incorrect initial HTTP version", "",
this.httpRequestParser.getHttpVersion());
assertEquals("Incorrect initial HTTP headers", 0,
this.httpRequestParser.getHeaders().size());
assertNull("Initially should be no body",
this.httpRequestParser.getBody());
}
COM: <s> ensure correct initial state </s>
|
funcom_train/37192186 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getFileSize(File f) {
File[] dContent;
int dSize;
if (f.isDirectory() == false) {
return (int)(f.length() / 1024f);
}
else {
dContent = f.listFiles();
dSize = 0;
for (int a = 0; a < dContent.length; a++) {
dSize += getFileSize(dContent[a]);
}
return dSize;
}
}
COM: <s> calculate the size of one file kb </s>
|
funcom_train/10912941 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addSpaces() {
for (int i = areaInfo.startIndex; i < areaInfo.breakIndex; i++) {
char spaceChar = foText.charAt(i);
if (!CharUtilities.isZeroWidthSpace(spaceChar)) {
textArea.addSpace(spaceChar, 0, CharUtilities.isAdjustableSpace(spaceChar));
}
}
}
COM: <s> the code area info code stores information about spaces </s>
|
funcom_train/50462747 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void propertyChange(PropertyChangeEvent evt) {
//Name Change
if(evt.getSource()==action && evt.getPropertyName().equals(Action.NAME)) {
textLabel.setText((String)evt.getNewValue());
invalidate();
parentMenu.updateSizeToPreferredSize();
}
}
COM: <s> we are a property change listener for the action </s>
|
funcom_train/16300520 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeBreakdown(PrintStream ps, Hashtable packageBreakdown) {
Enumeration keys = packageBreakdown.keys();
String pkg = null;
int totalClasses = 0;
while (keys.hasMoreElements()) {
pkg = (String) keys.nextElement();
PackageReportContainer report = (PackageReportContainer) packageBreakdown.get(pkg);
writeReport(report, ps);
totalClasses += report.getAllClasses();
}
}
COM: <s> writes the coverage breakdown of monitored classes divided by package </s>
|
funcom_train/43043766 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getRetweetedByMeAsync(TwitterListener listener) {
getDispatcher().invokeLater(new AsyncTask(RETWEETED_BY_ME, listener, null) {
public void invoke(TwitterListener listener,Object[] args) throws TwitterException {
listener.gotRetweetedByMe(getRetweetedByMe());
}
});
}
COM: <s> returns the 20 most recent retweets posted by the authenticating user </s>
|
funcom_train/33847986 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getIntValue(int stackDepth, int defaultValue) {
if (stack.getStackDepth() < stackDepth)
return defaultValue;
OpcodeStack.Item it = stack.getStackItem(stackDepth);
Object value = it.getConstant();
if (value == null || !(value instanceof Integer))
return defaultValue;
return ((Number) value).intValue();
}
COM: <s> return an int on the stack or default value if cant determine </s>
|
funcom_train/28743076 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ProcedureInfo getProcedureInfoById(Integer id) throws SimsException {
//String errMsg = clsName + ".getProcedureInfoById(): ";
ProcedureInfo info;
try {
local = this.getProcedureLocalById(id);
info = local.getProcedureInfo();
}
catch (RuntimeException e) {
//Propagate.
throw e;
}
return info;
}
COM: <s> get procedure info object by id </s>
|
funcom_train/7989476 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected SensorData makeTestSensorData3() throws Exception {
return new SensorData(Tstamp.makeTimestamp("2009-07-28T09:30:00.000-10:00"), "JUnit",
makeTestSource1().toUri(server), new Property(SensorData.POWER_CONSUMED, "9500"));
}
COM: <s> creates a sensor data for use in testing 3 in a series </s>
|
funcom_train/17490596 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paint(Graphics g) {
clipRect = g.getClipBounds();
// If the component contains other components
// call the super classes paint to first paint
// this component and then other components on top of it.
if (showComponents) {
super.paint(g);
// Otherwise just paint the current component.
} else {
paintComponent(g);
}
}
COM: <s> painting the component and other components if it contains any to the </s>
|
funcom_train/45228487 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateGradeItem(GradeAssertion item) {
// There isn't anything to do; the object reference takes care of all of the
// changes. I needed this to trigger a grade updated event to refresh the grade
// table view. I added it as a full hook to update the item in case I need to
// do anything with it later.
fireActiveProjectGradeUpdatedEvent();
}
COM: <s> causses the grade item with potentially changed values to be saved </s>
|
funcom_train/45541879 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addInternalTrim(Rectangle trim) {
Rectangle textTrim= fText.computeTrim(0, 0, 0, 0);
trim.x+= textTrim.x;
trim.y+= textTrim.y;
trim.width+= textTrim.width;
trim.height+= textTrim.height;
if (fStatusField != null) {
trim.height+= fSeparator.computeSize(SWT.DEFAULT, SWT.DEFAULT).y;
trim.height+= fStatusField.computeSize(SWT.DEFAULT, SWT.DEFAULT).y;
trim.height+= 1; // verticalSpacing
}
}
COM: <s> adds the internal trimmings to the given trim of the shell </s>
|
funcom_train/5260719 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addGuidedByPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_BusinessProcess_guidedBy_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_BusinessProcess_guidedBy_feature", "_UI_BusinessProcess_type"),
BmmPackage.Literals.BUSINESS_PROCESS__GUIDED_BY,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the guided by feature </s>
|
funcom_train/6432962 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void copyInto(Object anArray[][]) {
for(int i = 0; i < anArray.length; i++)
{
for(int j = 0; j < anArray[i].length; j++)
{
anArray[i][j] = elementAt(i, j);
}
}
}
COM: <s> fills an array with corresponding values in data vector by calling </s>
|
funcom_train/38318255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkRange (boolean bReadonly, int nStart, int nEnd) {
if (nStart >= _nDataStart && nStart < _nDataStart + HEADER_SIZE) {
throw new IllegalStateException(
"Packet header modification not allowed at offset [" +
(nStart - _nDataStart) + "]!"
);
}
super.checkRange(bReadonly, nStart, nEnd);
}
COM: <s> check if the given range is in data range </s>
|
funcom_train/16538159 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getSizeText() {
if (sizeText == null) {
NumberFormat integerFormat = NumberFormat.getIntegerInstance();
integerFormat.setParseIntegerOnly(true);
sizeText = new JFormattedTextField(integerFormat);
sizeText.setValue(config.getNCols());
sizeText.setToolTipText("Number of hosts along one side of the square lattice");
sizeText.setHorizontalAlignment(JTextField.TRAILING);
}
return sizeText;
}
COM: <s> this method initializes size text </s>
|
funcom_train/24934171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int maxWidth( FontMetrics fm ) {
final int LARGEST_WIDTH = 100;
int labelWidth = fm.stringWidth( fLabel );
double sWidth = fSource.getWidth();
int maxWidth = Math.max( 30, Math.max( labelWidth, (int) sWidth/2 ));
if ( maxWidth > LARGEST_WIDTH ) {
maxWidth = LARGEST_WIDTH;
}
return maxWidth;
}
COM: <s> calculates the max width of the label on a reflexive edge </s>
|
funcom_train/17828194 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String doBracketedString() {
StringBuilder sb = new StringBuilder();
++idx;
while (idx < len && sql.charAt(idx) != ']') {
sb.append(sql.charAt(idx));
++idx;
}
if (idx < len) {
++idx;
}
return sb.toString();
}
COM: <s> called to process object names that are in brackets </s>
|
funcom_train/23307650 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void play(String file, float x, float y, float z, int att_model, float distOrRolloff) {
updateListener();
mySoundSystem.quickPlay(false, Sysutil.getURL(file), file, false, x, y, z, att_model, distOrRolloff);
}
COM: <s> play a sound clip with a particular volume </s>
|
funcom_train/4078654 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getParameterClass() {
if(StringHelper.isNotBlank(parameterClass)) return parameterClass;
if(StringHelper.isBlank(operation)) return null;
if(isSelectSql()) {
return StringHelper.makeAllWordFirstLetterUpperCase(StringHelper.toUnderscoreName(operation))+"Query";
}else {
return StringHelper.makeAllWordFirstLetterUpperCase(StringHelper.toUnderscoreName(operation))+"Parameter";
}
}
COM: <s> sql parameter object class br </s>
|
funcom_train/4237310 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetOrden() {
System.out.println("getOrden");
OrdenPlatillo instance = new OrdenPlatillo();
Orden prueba = new Orden();
instance.setOrden(prueba);
Orden expResult = prueba;
Orden result = instance.getOrden();
assertEquals(expResult, result);
}
COM: <s> test of get orden method of class data </s>
|
funcom_train/11322335 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLegendAttribute(String name, String value) {
if (name == null) {
throw new IllegalArgumentException("Null name parameter");
}
if (legendAttributes == null) {
legendAttributes = new HashMap<String, String>(5);
}
if (value != null) {
legendAttributes.put(name, value);
} else {
legendAttributes.remove(name);
}
}
COM: <s> set the fieldset html attribute with the given attribute name and value </s>
|
funcom_train/34453912 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean updateRegistrationSatus(Long id, int registrationStatus) {
boolean ret = true;
try {
getHibernateTemplate().bulkUpdate("update Registration set status=? where id=?", new Object[]{registrationStatus,id});
} catch (Exception e) {
logger.error("An error occured during the attempt to update registration status for registrationID="+id,e);
ret = false;
}
return ret;
}
COM: <s> updates the registration status in a cheap db action </s>
|
funcom_train/48054121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CompositeItem createCompositeItem() {
Map<String, String> elementAlias2Id = new HashMap<String, String>(elements.size());
for (CompositeNodeItemElement e : elements.getElements()) {
elementAlias2Id.put(e.getAlias(), e.getItemData().getOPCID());
}
return new CompositeItem(getName(), elementAlias2Id, script, engineHandler, dataType);
}
COM: <s> creates a composite item that can be used by the backup manager </s>
|
funcom_train/37462070 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processInfoInDescription(String definition, String otherInfoString) {
// obsolete message
if ( otherInfoString.startsWith( OBSOLETE_DEF )) {
this.obsoleteMessage = otherInfoString;
if (otherInfoString != null){
processObsoleteMessage();
}
}
else {
processOtherInfoInDescription(definition, otherInfoString);
}
}
COM: <s> process the other information in the description </s>
|
funcom_train/15493206 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testHashCode() {
System.out.println("hashCode");
BasicPrincipal instance = new BasicPrincipal(null);
int expResult = 0;
int result = instance.hashCode();
assertEquals(expResult, result);
instance = new BasicPrincipal("test");
assertEquals(instance.hashCode(), instance.hashCode());
}
COM: <s> test of hash code method of class com </s>
|
funcom_train/17203822 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNumberOfNonvolatileFPRs(short n) {
if (VM.BuildForPowerPC) {
setFirstNonVolatileFPR(ArchitectureSpecific.RegisterConstants.NUM_FPRS - n);
} else if (VM.BuildForIA32) {
setFirstNonVolatileFPR(ArchitectureSpecific.RegisterConstants.NUM_NONVOLATILE_FPRS - n);
} else if (VM.VerifyAssertions) {
VM._assert(VM.NOT_REACHED);
}
}
COM: <s> set the number of non volatile fprs used by this method </s>
|
funcom_train/22432642 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuBar getMenuBarTop() {
if (menuBarTop == null) {
menuBarTop = new JMenuBar();
menuBarTop.add(getMenuFile());
menuBarTop.add(getMenuSession());
menuBarTop.add(getMenuAccount());
menuBarTop.add(getMenuTest());
menuBarTop.add(getMenuProxy());
menuBarTop.add(getMenuLang());
menuBarTop.add(getMenuHelp());
}
return menuBarTop;
}
COM: <s> this method initializes menu bar top </s>
|
funcom_train/43521192 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenu createMenu() {
final JMenu menu = new JMenu("");
if(this.getWindowDecorationStyle() == JRootPane.FRAME) {
this.addMenuItems(menu);
// we use this property to prevent the Menu from drawing rollovers
menu.putClientProperty("isSystemMenu", Boolean.TRUE);
}
return menu;
}
COM: <s> returns the code jmenu code displaying the appropriate menu items </s>
|
funcom_train/16273565 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void ensureRegionRootExists() {
if (regionRoot == null || !regionRoot.isValid())
establishRegionRootNode();
// Fix up the resident flag
if (regionRoot != null && regionRoot.isValid() && !regionRoot.isResident())
regionRoot.setResident(true);
}
COM: <s> checks for the validity of the root cache node for this region </s>
|
funcom_train/4928137 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ImageButton addBullet(int x, int y) {
ImageButton bulletButton = new ImageButton(bul, bulRol, bulSel);
bulletButton.setLocation(x - 12, y - 12);
bulletButton.setSize(24, 24);
add(bulletButton);
return bulletButton;
}
COM: <s> adds a new bullet button </s>
|
funcom_train/36636019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void displaySetup() {
GL gl = canvas.getGL();
if (wireframe) {
gl.glCullFace(GL.GL_BACK);
gl.glDisable(GL.GL_CULL_FACE);
gl.glPolygonMode(GL.GL_FRONT_AND_BACK, GL.GL_LINE);
}
else {
gl.glCullFace(GL.GL_BACK);
gl.glPolygonMode(GL.GL_FRONT_AND_BACK, GL.GL_FILL);
}
if (lighting) {
gl.glEnable(GL.GL_LIGHTING);
Light.turnOnLights(gl);
lightSetup(gl);
}
else {
gl.glDisable(GL.GL_LIGHTING);
}
}
COM: <s> set the culling wireframe and lighting paramters based on current settings </s>
|
funcom_train/21828187 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int skipWhitespace(char[] input, int startLoc, int end, int[] lineNr) {
int offset = startLoc;
while ((offset < end) && (input[offset] <= ' ')) {
offset += nextCharCountSkipEOL(input, offset, end, lineNr);
}
if (offset == end) {
throw unexpectedEndOfData(lineNr[0]);
}
return offset;
}
COM: <s> skips whitespace characters </s>
|
funcom_train/31826698 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAlpha(int alpha) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (data.gdipGraphics == 0 && (alpha & 0xFF) == 0xFF) return;
initGdip(false, false);
data.alpha = alpha & 0xFF;
if (data.gdipPen != 0) {
Gdip.Pen_delete(data.gdipPen);
data.gdipPen = 0;
}
if (data.gdipBrush != 0) {
destroyGdipBrush(data.gdipBrush);
data.gdipBrush = 0;
}
}
COM: <s> sets the receivers alpha value </s>
|
funcom_train/26594396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void promoteDatatype() throws DException {
switch (dataType) {
case BYTE:
case TINYINT:
case INTEGER:
case INT:
case SHORT:
case SMALLINT:
dataType = LONG;
break;
case LONG:
case BIGINT:
case REAL:
dataType = DOUBLE;
break;
case DOUBLE:
case FLOAT:
case DOUBLEPRECISION:
dataType = BIGDECIMAL;
break;
}
}
COM: <s> this method is used when addtion of values causes numeric overflow this </s>
|
funcom_train/7901571 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Query applyFilters(Query query) {
if (table.getFilters().isEmpty()) {
return query;
}
Query q = query.copy();
for (Map.Entry<String, Filter> e : table.getFilters().entrySet()) {
String k = e.getKey();
Filter f = e.getValue();
Map<String, FilterExtension> extensions = table.getFilterExtensions().get(k);
q.where(f.asExpression(extensions));
}
return q;
}
COM: <s> todo this uses a cast to use the non public copy method </s>
|
funcom_train/49319347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Coordinates toJ2000() {
switch (getEquinox()) {
case J2000_EQUINOX:
return this;
case B1950_EQUINOX:
Point2D.Double out = wcscon.fk425(new Point2D.Double(getRa(), getDec()));
return new Coordinates(out.x, out.y, J2000_EQUINOX);
default:
return null;
}
}
COM: <s> returns the coordinates converted to the j2000 equinox </s>
|
funcom_train/49044748 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addTimePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_AbsoluteTime_Time_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_AbsoluteTime_Time_feature", "_UI_AbsoluteTime_type"),
EventPackage.Literals.ABSOLUTE_TIME__TIME,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the time feature </s>
|
funcom_train/4890530 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String generateDefaultMessageKey(Flow flow, String property) {
String flowType = flow.getFlowPropertyProviderName();
StringBuilder sb = new StringBuilder("flow.");
tweak(flowType, sb);
sb.append('.');
tweak(property, sb);
return sb.toString();
}
COM: <s> generate default message keys where uppercase characters are preceded </s>
|
funcom_train/46014167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void notifyListeners(CallStatus status) {
CallStatusListener[] listenerArray;
synchronized (listeners) {
listenerArray = new CallStatusListener[listeners.size()];
listeners.toArray(listenerArray);
}
for (int i = 0; i < listenerArray.length; i++) {
listenerArray[i].callStatusChanged(status);
}
}
COM: <s> notify listeners of a change to call status </s>
|
funcom_train/50119488 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String query_descr() {
StringBuffer s = new StringBuffer("This is the dead body of "+formerName+".\n\r");
if(limbs.size() < 1)
s.append("This corpse has been totally mutilated.");
else
if(!limbs.has_limb(limbs.LIMB_HEAD))
s.append("It is decapitated.");
return s.toString();
}
COM: <s> this method overrides the basic things query descr to update the description </s>
|
funcom_train/28639448 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CompositeListener removeListener(String listenerName) {
int rows=getNumListeners();
for (int i=0;i<rows;i++) {
JAMonListener listener=(JAMonListener) listenerList.get(i);
String name=listener.getName();
if (listenerName.equalsIgnoreCase(name)) {
listenerList.remove(i);
break;
} else if (listener instanceof CompositeListener && ((CompositeListener)listener).hasListener(listenerName)) {
((CompositeListener)listener).removeListener(listenerName);
break;
}
}
return this;
}
COM: <s> remove the named listener from this composite listener </s>
|
funcom_train/25086332 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createPackageContents() {
if (isCreated) return;
isCreated = true;
// Create classes and their features
vddEClass = createEClass(VDD);
createEReference(vddEClass, VDD__RANGE);
createEReference(vddEClass, VDD__DFLTRANGE);
createEAttribute(vddEClass, VDD__NOMINAL);
vppEClass = createEClass(VPP);
createEReference(vppEClass, VPP__RANGE);
createEAttribute(vppEClass, VPP__DFLT);
}
COM: <s> creates the meta model objects for the package </s>
|
funcom_train/23354046 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void releaseLocks(Collection<Long> lockedIds, String user){
for (Long lockedId : lockedIds) {
EntryLockSingleton.getInstance().releaseLock(lockedId, user);
// LOGGER.info("Unlocking reaction with ID " + lockedId);
LOGGER.info(MessageFormat.format(rb.getString("info.unlocking"),
lockedId.toString()));
}
}
COM: <s> does the actual release of locks </s>
|
funcom_train/42903078 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getText(byte[] content, int start, String encoding) {
logger.info("iTunNORM:");
int length = Math.max(content.length - start - Util.getLastZeros(content, 1), 0);
return CharConverter.createString(content, start, length);
}
COM: <s> i tun norm </s>
|
funcom_train/44716121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paint(Graphics g) {
// System.out.println("GenericComponent.paint " + this);
if (m_doubleBuffer) {
Graphics off = m_backBuffer.getGraphics();
draw(off);
super.paint(off);
g.drawImage(m_backBuffer, 0, 0, this);
off.dispose();
} else {
draw(g);
super.paint(g);
}
}
COM: <s> paints the component by calling the draw method </s>
|
funcom_train/10188442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed( ActionEvent arg0 ) {
UserDictionaryProvider provider = SpellChecker.getUserDictionaryProvider();
if( provider != null ) {
provider.addWord( word );
}
Dictionary dictionary = SpellChecker.getCurrentDictionary();
dictionary.add( word );
dictionary.trimToSize();
AutoSpellChecker.refresh( jText );
}
COM: <s> add the word to the current user directory </s>
|
funcom_train/35329570 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void buildTrapEntries(Hashtable<InetAddress, Vector<String>> dest) {
if (children != null) {
for (int i = 0; i < children.length; ++i) {
SimpleNode n = (SimpleNode)children[i];
if (n != null) {
n.buildTrapEntries(dest);
}
} /* end of loop */
}
}
COM: <s> build the trap entries from the syntactic tree </s>
|
funcom_train/26226062 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PositionedError beautifyParseError(ParserException e) {
String message = e.toString(); // can do better
if (message == null) {
message = "unknown";
} else {
int idx = message.indexOf(",");
if (idx >= 0) {
message = message.substring(idx + 1);
}
}
return new PositionedError(scanner.getTokenReference(), CompilerMessages.SYNTAX_ERROR, message);
}
COM: <s> generate an human readable error message </s>
|
funcom_train/25791964 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void visualizationFinished() {
m_mscView.refreshDisplays();
// Set focus to the latest statement added, if enabled
if (isStatementFocusEnabled() && (m_latestAddedStatement != null)) {
VisualItem visualStatement = m_mscVisualization
.getVisibleStatement(m_latestAddedStatement);
if (visualStatement != null) {
m_mscView.setStatementFocus(visualStatement);
m_latestAddedStatement = null;
}
}
}
COM: <s> this function is notified by the visualization thread that the </s>
|
funcom_train/50483417 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isCheck(boolean white) {
boolean result = false;
List controlledSquares = getControlledSquares(!white);
Coordinate kingPos = findKing(white);
Iterator i = controlledSquares.iterator();
while (i.hasNext() && !result) {
Coordinate c = (Coordinate) i.next();
result = c.equals(kingPos);
}
return result;
}
COM: <s> is the white king code white code equals code true code check </s>
|
funcom_train/4878394 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Text3D getLabelText3D() {
assert getLabelText() != null : "getLabelText() is null";
assert getLabelFont3D() != null : "getLabelFont() is null";
if (labelText3D == null) {
labelText3D = new Text3D(getLabelFont3D(), getLabelText(), new Point3f(0, 0, 0), ALIGN_CENTER, PATH_RIGHT);
}
return labelText3D;
}
COM: <s> gets the value of internal shape shape3 d </s>
|
funcom_train/20340662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String processCall(String payload) throws SerializationException {
try {
RPCRequest rpcRequest = RPC.decodeRequest(payload, this.remoteServiceClass);
// delegate work to the spring injected service
return RPC.invokeAndEncodeResponse(this.remoteService, rpcRequest.getMethod(), rpcRequest.getParameters());
} catch (IncompatibleRemoteServiceException e) {
return RPC.encodeResponseForFailure(null, e);
}
}
COM: <s> process the rpc request encoded into the payload string and return a </s>
|
funcom_train/32753125 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processChannels(List channelTables) {
_channelRefs = new ArrayList(channelTables.size());
for ( Iterator iter = channelTables.iterator() ; iter.hasNext() ; ) {
Map channelTable = (Map)iter.next();
String pv = (String)channelTable.get(RemoteLogging.CHANNEL_SIGNAL);
Boolean connected = (Boolean)channelTable.get(RemoteLogging.CHANNEL_CONNECTED);
_channelRefs.add( new ChannelRef(pv, connected) );
}
_postProxy.channelsChanged(this, _channelRefs);
}
COM: <s> process the channel information </s>
|
funcom_train/9114007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getKeywordsNotebook() throws BookmarkException {
//SessionFactory hfactory = null;
try {
//hfactory = (SessionFactory) ctx.lookup(hibernateSessionFactory);
String repositoryName = context.getCallerPrincipal().getName();
return manager.getKeywordsNotebook(repositoryName);
} catch (Exception e) {
if (e instanceof BookmarkException) {
throw (BookmarkException) e;
}
throw new BookmarkException(e);
} finally {
}
}
COM: <s> label keywords fopr notebook </s>
|
funcom_train/36858945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getPercentToNextLevel(final int index) {
final int lvl = getRealSkillLevel(index);
if (lvl == 99)
return 0;
final int xpTotal = Skills.xpTable[lvl + 1] - Skills.xpTable[lvl];
if (xpTotal == 0)
return 0;
final int xpDone = getCurrentSkillExp(index) - Skills.xpTable[lvl];
return 100 * xpDone / xpTotal;
}
COM: <s> returns the percent of the way to the next level </s>
|
funcom_train/22112406 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isRecoveryDefinition() {
for (Iterator it = getConditionsBag().iterator(); it.hasNext();) {
AlertCondition cond = (AlertCondition) it.next();
if (cond.getType() == EventConstants.TYPE_ALERT) {
return true;
}
}
return false;
}
COM: <s> check if the alert definition is a recovery alert </s>
|
funcom_train/50341834 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isPanelNameUsed (String name) {
if (panelsList.size()==0) return false;
for (int i = 0; i<panelsList.size(); i++) {
try{
Editor editor = panelsList.get(i);
if (editor.getTargetFrame().getTitle().equals(name)) {
return true;
}
} catch(Exception e){
}
}
return false;
}
COM: <s> determine if named panel already exists </s>
|
funcom_train/3122294 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Map getCol(Object colHeader) {
Iterator it = grid.keySet().iterator();
Object key;
Map mapTmp = new LinkedHashMap();
while (it.hasNext()) {
key = it.next();
mapTmp.put(key, get(key, colHeader));
}
return (mapTmp);
} // of method
COM: <s> retrieves a single column with the specified column header </s>
|
funcom_train/17849107 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeData(ObjectOutputStream out) throws IOException {
out.writeInt(5); // version
out.writeUTF(getDataServiceProxy().getId());
out.writeUTF(getGroup().getId());
out.writeUTF(getCountry());
out.writeUTF(mId);
}
COM: <s> serialized this object </s>
|
funcom_train/31101832 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void pushContext() {
// extend the array, if necessary
if (fCurrentContext + 1 == fContext.length) {
int[] contextarray = new int[fContext.length * 2];
System.arraycopy(fContext, 0, contextarray, 0, fContext.length);
fContext = contextarray;
}
// push context
fContext[++fCurrentContext] = fNamespaceSize;
} // pushContext()
COM: <s> start a new namespace context </s>
|
funcom_train/18329144 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AiPlayerInfo getAiWithId(final int id) throws DatabaseException {
List<AiPlayerInfo> l = runQuery
(SELECT_AI+" WHERE ai_player.id = ?", new AiQuery() {
void setup(PreparedStatement ps) throws SQLException {
super.setup(ps);
ps.setInt(1, id);
}
});
return (l.size()==0) ? null : l.get(0);
}
COM: <s> get information about an ai lookup by id number </s>
|
funcom_train/29290056 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeQuestionType(QuestionTypeCMPData data) throws EJBException {
try {
QuestionTypeCMPLocal questionTypeLocal = getQuestionTypeCMPLocalHome()
.findByPrimaryKey(data.getQuestion_type_id());
questionTypeLocal.remove();
} catch (FinderException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (RemoveException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
COM: <s> remove question type busines method </s>
|
funcom_train/7616159 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addNotify() {
toolkit.lockAWT();
try {
prepare4HierarchyChange();
behaviour.addNotify();
// ???AWT
// finishHierarchyChange(this, parent, 0);
// if (dropTarget != null) {
// dropTarget.addNotify(peer);
// }
} finally {
toolkit.unlockAWT();
}
}
COM: <s> connects this component to a native screen resource and makes it </s>
|
funcom_train/43327825 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void processYAPF(String buffer) {
if ((buffer!=null) && (buffer.startsWith("DATA "))) {
StringTokenizer st = new StringTokenizer(buffer," ");
try {
st.nextToken();
Class c = Info.getClass(st.nextToken());
Info info = (Info)c.newInstance();
info.processYAPF(buffer);
addInfo(info);
}
catch (NoSuchElementException e) {
}
catch (IllegalAccessException e) {
}
catch (InstantiationException e) {
}
}
}
COM: <s> process a line of info from a yapf file </s>
|
funcom_train/12177151 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFragmentName (String fragmentName) {
// If the new fragment name is different to the existing one then clear
// the dissecting pane and shard index, otherwise if they are the same
// then do nothing.
if (FragmentationState.equals (this.fragmentName, fragmentName)) {
return;
}
this.fragmentName = fragmentName;
this.dissectingPaneName = null;
this.shardIndex = 0;
}
COM: <s> set the name of the current fragment within this inclusion </s>
|
funcom_train/32943496 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProfileAsDefault(Profile aProfile) {
profileDao.setProfileAsDefault(aProfile);
auditor.audit(AuthUtil.getRemoteUserObject(), Profile.class.getName(), aProfile.getOid(), Auditor.ACTION_SET_DEFAULT_PROFILE, "The profile " + aProfile.getName() + " has been set as the default for " + aProfile.getOwningAgency().getName());
}
COM: <s> set the profile as the default for this agency </s>
|
funcom_train/29653986 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int _freadint(final InputStream f) throws IOException {
// We'll assume big-endian encoding here.
int a = 0;
for (int i = 0; i < 4; i++) {
int shift = (4 - 1 - i) * 8;
int in = f.read();
byte b = (byte) in;
a += (b & 0x000000FF) << shift;
}
return a;
}
COM: <s> read a 4 byte integer from file </s>
|
funcom_train/47191969 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString(TTFFile t) {
return "Glyph " + name + " index: " + getIndexAsString() + " bbox ["
+ (boundingBox[0]) + " "
+ (boundingBox[1]) + " "
+ (boundingBox[2]) + " "
+ (boundingBox[3]) + "] wx: "
+ (wx);
}
COM: <s> returns a string representation of this object </s>
|
funcom_train/20880656 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void repaintBrush() {
int x1 = Math.min(startX, endX);
int y1 = Math.min(startY, endY);
int x2 = Math.max(startX, endX);
int y2 = Math.max(startY, endY);
repaint(x1 - 128, y1 - 128, x2 - x1 + 256, y2 - y1 + 256);
}
COM: <s> repaint the area containing the brush </s>
|
funcom_train/13272154 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFloorColor(Integer floorColor) {
if (floorColor != this.floorColor
|| (floorColor != null && !floorColor.equals(this.floorColor))) {
Integer oldFloorColor = this.floorColor;
this.floorColor = floorColor;
this.propertyChangeSupport.firePropertyChange(Property.FLOOR_COLOR.name(),
oldFloorColor, floorColor);
}
}
COM: <s> sets the floor color of this room </s>
|
funcom_train/50082382 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String phaseTranslator(String serie) {
if(serie.equals("Gas"))
return GT._("Gas");
else if(serie.equals("Liquid"))
return GT._("Liquid");
else if(serie.equals("Solid"))
return GT._("Solid");
else
return GT._("Unknown");
}
COM: <s> get translated name of phase </s>
|
funcom_train/43787672 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testToArray() {
String[] orig = new String[] {"aaa", "bbb", "ccc"};
List<String> origList = Arrays.asList(orig);
String[] dest = ArrayUtils.toArray(origList, String[].class);
Assert.assertEquals(orig, dest);
}
COM: <s> test method for </s>
|
funcom_train/39273771 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getDays() {
List days = new ArrayList(ConstantValues.INT_DAYS_IN_A_WEEK);
days.add(mSunday);
days.add(mMonday);
days.add(mTuesday);
days.add(mWednesday);
days.add(mThursday);
days.add(mFriday);
days.add(mSaturday);
return Collections.unmodifiableList(days);
}
COM: <s> get all of the day form beans associated with this week </s>
|
funcom_train/15493856 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isLong(String key) throws ConfigurationException {
XMLConfigurationEntry entry = (XMLConfigurationEntry)entries.get(key);
if (entry == null) {
throw new ConfigurationException("The entry [" + key
+ "] does not exist");
}
if (entry.getType().getType() == XMLConfigurationType.LONG_VALUE) {
return true;
}
return false;
}
COM: <s> this method returns true if the object is a long </s>
|
funcom_train/22439710 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(IResource[] resources, IProgressMonitor progress) throws TeamException {
progress.beginTask(Policy.bind("delete"), 1000);
execute(new IIterativeOperation() {
public IStatus visit(IResource resource, int depth, IProgressMonitor progress) {
ResourceState state = _stateFactory.getState(resource);
IStatus status = state.delete(progress);
if (!status.isOK()) {
return status;
}
// remote resource state.
_stateFactory.remove(resource);
return status;
}
}, resources, IResource.DEPTH_INFINITE, progress);
}
COM: <s> delete the corresponding remote resource </s>
|
funcom_train/596925 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void enlarge(final int size) {
int length1 = 2 * data.length;
int length2 = length + size;
byte[] newData = new byte[length1 > length2 ? length1 : length2];
System.arraycopy(data, 0, newData, 0, length);
data = newData;
}
COM: <s> enlarge this byte vector so that it can receive n more bytes </s>
|
funcom_train/5551951 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void verifySequence(double lower, double initial, double upper) {
if (!isSequence(lower, initial, upper)) {
throw new IllegalArgumentException
("Invalid interval, initial value parameters: lower=" +
lower + " initial=" + initial + " upper=" + upper);
}
}
COM: <s> verifies that code lower initial upper code </s>
|
funcom_train/44083240 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {
System.out.println("return getTableCellEditorComponent(): value:" + value.getClass().getName() );
this.row = row;
currentData = (ParametrizedQuery)value;
return button_;
}
COM: <s> get the value stored in the table model before editing </s>
|
funcom_train/41163155 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(CoKnowledgeField entity) {
EntityManagerHelper.log("deleting CoKnowledgeField instance", Level.INFO, null);
try {
entity = getEntityManager().getReference(CoKnowledgeField.class, entity.getKnowledgeFieldId());
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 co knowledge field entity </s>
|
funcom_train/8763412 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JToggleButton getSelectObject() {
if (selectObject == null) {
selectObject = new JToggleButton();
selectObject.setText("Select Object");
selectObject.addItemListener(new java.awt.event.ItemListener() {
public void itemStateChanged(java.awt.event.ItemEvent e) {
defView.setHintMouseMode(ActionHint.select);
canvasContext.getCanvas().repaint();
}
});
}
return selectObject;
}
COM: <s> this method initializes select object </s>
|
funcom_train/51646544 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void removeAllAnnotations(boolean fireModelChanged) {
if (fDocument != null) {
Iterator e= getAnnotationMap().keySetIterator();
while (e.hasNext()) {
Annotation a= (Annotation) e.next();
Position p= (Position) fAnnotations.get(a);
removePosition(fDocument, p);
// p.delete();
synchronized (getLockObject()) {
getAnnotationModelEvent().annotationRemoved(a, p);
}
}
}
fAnnotations.clear();
if (fireModelChanged)
fireModelChanged();
}
COM: <s> removes all annotations from the annotation model </s>
|
funcom_train/39109442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public String toString() {
String SEP = "";
StringBuilder buff = new StringBuilder();
buff.append("[");
for (int i = 0; i < dateComponents.length; i++) {
buff.append(SEP+dateComponents[i]);
SEP=",";
}
buff.append("]");
return buff.toString();
}
COM: <s> string version of this object </s>
|
funcom_train/34355185 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasControlPermission() {
PipelinePermissions permissions = pipelineController.getPermissions();
if (permissions != null) {
return permissions.isControlPermission();
}
// it is unlikely that controller would ever return null permissions (even when the pipeline does not exist or any
// other error occurs, it should return "default" all-negative permissions).
return false;
}
COM: <s> checks whether the current user has control permission to the currently displayed pipeline </s>
|
funcom_train/13961503 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NSArray filteredObjects() {
if (displayGroup() instanceof ERXDisplayGroup) {
ERXDisplayGroup dg = (ERXDisplayGroup) displayGroup();
return dg.filteredObjects();
}
return displayGroup().qualifier() == null ? displayGroup().allObjects() : EOQualifier.filteredArrayWithQualifier(displayGroup().allObjects(), displayGroup().qualifier());
}
COM: <s> the display groups objects filtered by the display group qualifier if any </s>
|
funcom_train/42155987 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSelectedSubscriptionType() {
ButtonModel selectedModel = subscriptionTypeButtonGroup.getSelection();
if ( selectedModel == null ) {
return NONE;
}
else if ( localFileRadioButton.isSelected() ) {
return LOCAL_FILE;
}
else if ( remoteFileRadioButton.isSelected() ) {
return REMOTE_FILE;
}
else {
return REMOTE_SERVICE;
}
}
COM: <s> get the selected subscription type </s>
|
funcom_train/38415935 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCharacterRank( String rank ) {
if(rank!=null)
for( int i=0; i<aielRank.length; i++ )
if( rank.equals(aielRank[i][0]) ) {
characterRank = rank;
return; // success
}
characterRank="unknown"; // not found
}
COM: <s> to set the rank of this wot character in his her community </s>
|
funcom_train/44154569 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ExtentCollection merge(ExtentCollection other) {
Assert.state(!m_frozen, "DataExtent is frozen and cannot be changed anymore");
if (m_containedEntity.getEntityClass().equals(other.m_containedEntity.getClass()) && !this.equals(other)) {
m_containedEntity.merge(other.m_containedEntity);
}
return this;
}
COM: <s> merge two extent collections </s>
|
funcom_train/50314399 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void touch( String resourceName, long timestamp, boolean touchRecursive ) throws CmsException {
CmsResource resource = readFileHeader( resourceName );
I_CmsResourceType resourceType = this.getResourceType( resource.getType() );
resourceType.touch( this, resourceName, timestamp, touchRecursive );
}
COM: <s> change the timestamp of a resource </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.