__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/19655740 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Cursor fetchRecipe(long rowId) throws SQLException {
Cursor mCursor =
mDb.query(true, DB_TABLE, new String[] { KEY_ID, KEY_TITLE, KEY_BODY },
KEY_ID + "=" + rowId, null, null, null, null, null);
if (mCursor != null) {
mCursor.moveToFirst();
}
return mCursor;
}
COM: <s> return a cursor positioned at the recipe that matches the given row id </s>
|
funcom_train/47554860 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Node visitChildren(NodeVisitor v) {
List inits = visitList(this.inits, v);
Expr cond = (Expr) visitChild(this.cond, v);
List iters = visitList(this.iters, v);
Node body = visitChild(this.body, v);
if (body instanceof NodeList) body = ((NodeList) body).toBlock();
return reconstruct(inits, cond, iters, (Stmt) body);
}
COM: <s> visit the children of the statement </s>
|
funcom_train/12245497 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone() {
Utterance ret = new Utterance();
Vector syls = new Vector();
for (Iterator iter = syllables.iterator(); iter.hasNext();) {
Syllable syl = (Syllable) iter.next();
syls.add(syl.clone());
}
ret.setSyllables(new Vector(syls));
if (syllableAnnotated)
ret.setSyllableAnnotated();
Vector ps = new Vector();
for (Iterator iter = phonemes.iterator(); iter.hasNext();) {
Phoneme p = (Phoneme) iter.next();
ps.add(p.clone());
}
ret.setPhonemes(ps);
return ret;
}
COM: <s> create a copy of the utterance </s>
|
funcom_train/1680303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void printEntries(String label, Iterator iterator) {
System.out.println("\n--- " + label + " ---");
while (iterator.hasNext()) {
Map.Entry entry = (Map.Entry) iterator.next();
System.out.println(entry.getKey().toString());
System.out.println(entry.getValue().toString());
}
}
COM: <s> print the key value objects returned by an iterator of map </s>
|
funcom_train/6434948 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkSimpleReplaceRule(String sentence, String word) throws IOException {
final RuleMatch[] matches = rule.match(langTool.getAnalyzedSentence(sentence));
assertEquals("Invalid matches.length while checking sentence: "
+ sentence, 1, matches.length);
assertEquals("Invalid replacement count wile checking sentence: "
+ sentence, 1, matches[0].getSuggestedReplacements().size());
assertEquals("Invalid suggested replacement while checking sentence: "
+ sentence, word, matches[0].getSuggestedReplacements().get(0));
}
COM: <s> check if a specific replace rule applies </s>
|
funcom_train/43571689 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getPaneWork() {
if (paneWork == null) {
paneWork = new JPanel();
paneWork.setLayout(new CardLayout());
paneWork.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
paneWork.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
paneWork.add(getTabbedWork(), getTabbedWork().getName());
}
return paneWork;
}
COM: <s> this method initializes pane work </s>
|
funcom_train/8131756 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ITabStrip createTabStrip(String id) {
tabStrip = new StandardTabStrip(id) {
// overwrite this method to get control of the listener
@Override
public void setListener(ITabListener listener) {
if (listener instanceof DelegateTabListener) {
super.setListener(listener);
}
else {
((DelegateTabListener)getListener()).setDelegate(listener);
}
}
};
tabStrip.setListener(new DelegateTabListener());
return tabStrip;
}
COM: <s> create a tab with a delegate tab listener that handles master detail specifics </s>
|
funcom_train/33967711 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onReceive(Context context, Intent intent) {
mCurrentNetworkInfo = (NetworkInfo) intent
.getParcelableExtra(ConnectivityManager.EXTRA_NETWORK_INFO);
mPossibleNetworkInfo = (NetworkInfo) intent
.getParcelableExtra(ConnectivityManager.EXTRA_OTHER_NETWORK_INFO);
intent.getBooleanExtra(ConnectivityManager.EXTRA_IS_FAILOVER,
mIsFailingOver);
intent.getBooleanExtra(ConnectivityManager.EXTRA_NO_CONNECTIVITY,
mIsNoConnectivity);
mNetworkExtraInfo = intent
.getStringExtra(ConnectivityManager.EXTRA_EXTRA_INFO);
mNetworkFailureReason = intent
.getStringExtra(ConnectivityManager.EXTRA_REASON);
mNetworkController.onNetworkStatusChanges();
}
COM: <s> receive the network connection status changes </s>
|
funcom_train/51542918 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write_string16 (int j, String s) {
char[] chars = s.toCharArray();
int len = chars.length;
for (int i = 0; i < len; i++)
{
data[j + i * 2] = (byte) (chars[i] >> 8);
data[j + i * 2 + 1] = (byte) (chars[i] & 0xFF);
}
}
COM: <s> writes a field of type string16 into the data buffer at the specified </s>
|
funcom_train/12638552 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void expungeExpiredEntries() {
emptyQueue();
if (lifetime == 0) {
return;
}
int cnt = 0;
long time = System.currentTimeMillis();
for (Iterator t = cacheMap.values().iterator(); t.hasNext(); ) {
CacheEntry entry = (CacheEntry)t.next();
if (entry.isValid(time) == false) {
t.remove();
cnt++;
}
}
if (DEBUG) {
if (cnt != 0) {
System.out.println("Removed " + cnt
+ " expired entries, remaining " + cacheMap.size());
}
}
}
COM: <s> scan all entries and remove all expired ones </s>
|
funcom_train/1693761 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Body createDynamicBody(BodyDef def) {
assert(m_lock == false);
if (m_lock == true) {
return null;
}
Body b = new Body(def, Body.e_dynamicType, this);
// Add to world doubly linked list.
b.m_prev = null;
b.m_next = m_bodyList;
if (m_bodyList != null) {
m_bodyList.m_prev = b;
}
m_bodyList = b;
++m_bodyCount;
return b;
}
COM: <s> create a dynamic rigid body given a definition </s>
|
funcom_train/13888439 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasType(String type, PartialOrder domain) {
if (type == null) {
return false;
} else {
FeatureStructure fs = getFs();
if (fs != null) {
String thisType = (String) fs.getAtomicPathValue(S_ACT_TYPE_PATH);
if (thisType != null) {
if (domain != null) {
return domain.reach(type, thisType);
} else {
return type.equals(thisType);
}
}
}
return false;
}
}
COM: <s> returns true iff the data source is of given type </s>
|
funcom_train/4422409 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showCachePopup() {
Coordinate coord = cache.getWaypoint().getCoordinate();
String scale = getResources().getBoolean(R.bool.screen_large) ? "scale=2&" : "";
String url = "http://maps.googleapis.com/maps/api/staticmap?" + scale + "zoom=14&size=400x400&markers=color:blue%7Clabel:A%7C"
+ coord.getLatitude() + "," + coord.getLongitude() + "&sensor=true";
showPopup(url);
}
COM: <s> shows the cache waypoint in a popup </s>
|
funcom_train/33238378 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void verifySignature(Document doc) throws Exception {
System.out.println("Begin signature verification...");
long startTime = System.nanoTime();
secEngine.processSecurityHeader(doc, null, this, crypto);
long stopTime = System.nanoTime();
System.out.println("Signature verification was successfully!");
this.printElapsedTime( stopTime - startTime );
}
COM: <s> verifies the soap envelope signature </s>
|
funcom_train/34794041 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFromProperties(String propfile) throws PerforceException {
Properties props = new Properties(System.getProperties());
if (null != propfile) {
try {
props.load(new BufferedInputStream(new FileInputStream(propfile)));
System.setProperties(props);
} catch (Exception e) {
System.err.println("Unable to load properties.");
e.printStackTrace(System.err);
throw new PerforceException("Unable to load properties from "+
propfile);
}
}
setFromProperties(props);
}
COM: <s> sets the environment using the specified properties file </s>
|
funcom_train/11297625 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Rectangle2D getJavaRectangle(LatLonRect rect) {
return new Rectangle2D.Double(rect.lowerLeft.getShiftedLon(),
rect.lowerLeft.getShiftedLat(), rect.upperRight.getShiftedLon()
- rect.lowerLeft.getShiftedLon(), rect.upperRight.getShiftedLat()
- rect.lowerLeft.getShiftedLat());
}
COM: <s> creates a java rectangle2 d of the specified lat lon rect </s>
|
funcom_train/1798159 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean matches(MetadataContext other) {
return other != null
&& (altFormat == null || altFormat.equals(other.altFormat))
&& (projection == null || projection.equals(other.projection))
&& (version == null
|| (other.version != null && other.version.isCompatible(version)));
}
COM: <s> returns true if this context is a match for the given context </s>
|
funcom_train/11785870 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAccount(Account acc) {
this.acc = acc;
barCodeText.setText(Integer.toString(acc.getBarcode()));
adressText.setText(acc.getAddress());
telephoneNoText.setText(acc.getPhoneNo());
ownerNameText.setText(acc.getOwnerName());
civicRegText.setText(acc.getCivicRegNbr());
pinCodeText.setText("");
expiryDateText.setText(acc.getExpiryDate());
parked = acc.parked();
}
COM: <s> set and print the information for this specific account </s>
|
funcom_train/49066944 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HashSet getWeightByNode(int cId) {
HashSet weight = new HashSet();
Iterator it = methodsTable.values().iterator();
while (it.hasNext()) {
ClassMethod mt = (ClassMethod) it.next();
HashSet methodWeight = mt.getWeightByNode(cId);
weight.addAll(methodWeight);
}
return weight;
}
COM: <s> returns a hash set with the corresponding weigth for </s>
|
funcom_train/28159592 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void visitCastExpression(JCastExpression self) {
JExpression expr = self.expr();
CType dest = self.getType();
if (expr.getApparentType() == CStdType.Null) {
print("(");
print(toString(dest));
print(")null");
} else {
String[] strArray = TransUtils.applyBigintCast(dest, expr.getApparentType(), toString(dest));
print(strArray[0]);
expr.accept(this);
print(strArray[1]);
}
}
COM: <s> prints a cast expression </s>
|
funcom_train/22261189 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int handle_quit(String line, StringTokenizer st) {
username = null;
password = null;
for (int i = 0; i < Ftpd.objList.size(); i++) {
if (this.equals((Ftpd_com) Ftpd.objList.get(i))) {
Ftpd.objList.remove(i);
}
}
return sendReply(221, "Byebye.");
}
COM: <s> handler for the quit command quit </s>
|
funcom_train/15626015 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSubFilterEnabled(@NotNull final String name, final boolean enabled) {
if (log.isDebugEnabled()) {
log.debug("setSubFilterEnabled(" + name + ", " + enabled);
}
getConfig(name).setEnabled(enabled);
fireEvent(FilterConfigChangeType.CHANGE, this);
}
COM: <s> sets whether a sub filter is enabled </s>
|
funcom_train/888540 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String polyRingVar(String nm, NumberField n){
String[] args = {n.getName()};
String alg = funCall(POLY_ALG, args); //univariate ring over n
String[] args2 = {alg, "[1,0]"}; //polynomial of deg=1, no constant term
return assignToFunCall(nm, POLY, args2);
}
COM: <s> capture the variable for the univariate polynomial ring of the given number field </s>
|
funcom_train/32144106 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public UjoProperty getOrderBy() {
String propertyName = P_SORTED_BY.of(this);
for (UjoProperty p : UjoManager.getInstance().readProperties(Item.class)) {
if (p.getName().equals(propertyName)) {
return p;
}
}
return Item.P_MARK;
}
COM: <s> get item sort property </s>
|
funcom_train/25365915 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addIsHiddenEventPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Room_isHiddenEvent_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Room_isHiddenEvent_feature", "_UI_Room_type"),
LeveleditorPackage.Literals.ROOM__IS_HIDDEN_EVENT,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the is hidden event feature </s>
|
funcom_train/50082737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IMolecule readMolecule(IMolecule molecule) throws CDKException {
JmolAdapter adapter = new SmarterJmolAdapter(null);
// note that it actually let's the adapter detect the format!
Object model = adapter.openBufferedReader("", input);
molecule.add(new Convertor(molecule.getBuilder()).convert(model));
return molecule;
}
COM: <s> read a molecule from a jme file </s>
|
funcom_train/50480256 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean nearlyEquals ( TimeSpan ts ) {
if ( ( ( int ) ( ts.getStart( ) * 100 ) == ( int ) ( start * 100 ) ) &&
( ( int ) ( ts.getEnd( ) * 100 ) == ( int ) ( end * 100 ) ) ) {
return true;
}
return false;
}
COM: <s> times are equal within the resolution of digitization 0 </s>
|
funcom_train/10617394 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSignatureException04() {
Throwable cause = null;
SignatureException tE = new SignatureException(cause);
assertNull("getMessage() must return null.", tE.getMessage());
assertNull("getCause() must return null", tE.getCause());
}
COM: <s> test for code signature exception throwable code constructor </s>
|
funcom_train/48142898 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
final StringBuffer buf=new StringBuffer(5);
buf.append(vector[0]).append(',').append(vector[1]).append(',').append(vector[2]);
return buf.toString();
}
COM: <s> returns a comma delimited string representing the value of this vector </s>
|
funcom_train/4253536 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AttributeField getAttribute(String a_name)
{ for (int i=0; i<av.size(); i++)
{ AttributeField a=(AttributeField)av.elementAt(i);
if (a.getAttributeName().equals(a_name)) return a;
}
return null;
}
COM: <s> gets a particular attribute </s>
|
funcom_train/4288420 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addParamDefPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_EnvParam_paramDef_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_EnvParam_paramDef_feature", "_UI_EnvParam_type"),
AlternativesPackage.Literals.ENV_PARAM__PARAM_DEF,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the param def feature </s>
|
funcom_train/12086397 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ObjectName getDefaultWorkManager() throws WebLogicMBeanException {
for (ObjectName wkMgr : getConn().getChildren(getServerRuntime(), WORK_MANAGER_RUNTIMES)) {
if (getConn().getTextAttr(wkMgr, NAME).equals(DEFAULT_WKMGR_NAME)) {
return wkMgr;
}
}
return null;
}
COM: <s> returns an mbean handle onto the default work manager for the server </s>
|
funcom_train/35275777 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doEditToolActivatedPrimary(Vector2f mouseLoc, boolean pressed, Camera camera) {
if (editTool != null) {
editTool.setCamera(camera);
editTool.actionPrimary(mouseLoc, pressed, rootNode, editorController.getCurrentDataObject());
}
}
COM: <s> primary button activated send command to the tool </s>
|
funcom_train/35241935 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String cmd(String cmd) throws IOException {
log.finer("Sending /" + cmd);
send("/" + cmd);
String line = null;
StringBuilder sb = new StringBuilder();
while (/*in.ready() &&*/ null != (line = in.readLine())) {
log.finest(" Line: " + line);
if (line.equals("---"))
break;
sb.append(line);
}
String ret = sb.toString();
log.finer("Result: " + ret);
return ret;
}
COM: <s> sends the supplied command adding a slash </s>
|
funcom_train/41576735 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getBackFromDefaultInputCommand() {
if (backFromDefaultInputCommand == null) {//GEN-END:|150-getter|0|150-preInit
// write pre-init user code here
backFromDefaultInputCommand = new Command("Back", Command.BACK, 0);//GEN-LINE:|150-getter|1|150-postInit
// write post-init user code here
}//GEN-BEGIN:|150-getter|2|
return backFromDefaultInputCommand;
}
COM: <s> returns an initiliazed instance of back from default input command component </s>
|
funcom_train/11678742 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onLogout(SessionID sessionID) {
countersMap.put(sessionID, 0);
FIXTransportSender trpSender = (FIXTransportSender) cfgCtx.getAxisConfiguration().
getTransportOut(FIXConstants.TRANSPORT_NAME).getSender();
trpSender.logOutIncomingSession(sessionID);
log.info("FIX session logged out: " + sessionID.toString());
}
COM: <s> this callback notifies when a fix session is no longer online </s>
|
funcom_train/48263639 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean updateNote(long rowId, String writer, String body) {
ContentValues args = new ContentValues();
args.put(KEY_WRITER, writer);
args.put(KEY_BODY, body);
return mDb.update(DATABASE_TABLE, args, KEY_ROWID + "=" + rowId, null) > 0;
}
COM: <s> update the note using the details provided </s>
|
funcom_train/2291814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getExplorerBodyUri() {
String body = "explorer_body_fs.jsp";
if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(m_uri)) {
body += "?" + PARAMETER_URI + "=" + m_uri;
}
return getJsp().link(body);
}
COM: <s> returns the explorer body frame content uri </s>
|
funcom_train/1130309 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void __compilePatterns() {
Perl5Compiler compiler = new Perl5Compiler();
try {
__matchPattern =
compiler.compile(__matchExpression, Perl5Compiler.SINGLELINE_MASK);
} catch(MalformedPatternException e) {
// This should only happen during debugging.
//e.printStackTrace();
throw new RuntimeException(e.getMessage());
}
}
COM: <s> compiles the patterns currently only the match expression used to </s>
|
funcom_train/7929143 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean replaceFrom( String source, String[] search, String replace ) {
boolean found = false;
if (source!=null)
{
for (int i = 0; i < search.length; i++) {
if ( source.endsWith( search[i] ))
{
sb.replace( sb.length() - search[i].length(), sb.length(), replace );
modified = true;
found = true;
setStrings();
break;
}
}
}
return found;
}
COM: <s> replace a search string with another within the source zone </s>
|
funcom_train/23748668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setShowYearButtons(boolean showYearButtons) {
this.showYearButtons = showYearButtons;
if (this.showYearButtons) {
getNextButtonPanel().add(getNextYearButton());
getPreviousButtonPanel().removeAll();
getPreviousButtonPanel().add(getPreviousYearButton());
getPreviousButtonPanel().add(getPreviousMonthButton());
} else {
getNextButtonPanel().remove(getNextYearButton());
getPreviousButtonPanel().remove(getPreviousYearButton());
}
}
COM: <s> sets the visibilty of the year navigation buttons </s>
|
funcom_train/11674993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeLong(long l) throws IOException {
output.write((int)((l & 0xff000000) >>> 24));
output.write((int)((l & 0x00ff0000) >>> 16));
output.write((int)((l & 0x0000ff00) >>> 8));
output.write((int) (l & 0x000000ff));
}
COM: <s> despite its name this method writes only 4 bytes to output </s>
|
funcom_train/49159917 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createVIA() {
via.put(VIA_FORM_KEY, new PlayerAttribute(VIA_FORM_KEY, 0));
via.put(VIA_ENERGY_KEY, new PlayerAttribute(VIA_ENERGY_KEY, 0));
via.put(VIA_MORALE_KEY, new PlayerAttribute(VIA_MORALE_KEY, 0));
}
COM: <s> create the via attributes for player </s>
|
funcom_train/36698489 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testParseYyForYy() throws ParseException {
DateFormat dateFormat = new SimpleDateFormat("dd/MM/yy");
Date expectedDate = new GregorianCalendar(2003, 1, 13).getTime();
Date parsedDate = dateFormat.parse("13/02/03");
assertEquals(expectedDate, parsedDate);
}
COM: <s> test for java </s>
|
funcom_train/21288334 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer buff = new StringBuffer();
Piece piece;
buff.append(this.moves);
buff.append(' ');
if (this.turn == Color.WHITE)
buff.append('W');
else
buff.append('B');
buff.append('\n');
for (int row = NUMBER_OF_ROWS-1; row >= 0; row--) {
for (int col = 0; col <= NUMBER_OF_COLUMNS-1; col++) {
piece = this.board[row][col];
if (piece == null) {
buff.append('.');
} else {
buff.append(piece.toChar());
}
}
buff.append('\n');
}
return buff.toString();
}
COM: <s> prints the state of the board as a string </s>
|
funcom_train/29779725 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void resolveParent(BeanFactory beanFactory) {
if (parent != null && parentBuilder == null) {
parentBuilder = (BeanBuilder) Util.checkAssignment(
BeanBuilder.class, beanFactory.getDefinition(parent));
}
if (getClassName() == null && parentBuilder != null) {
setClassName(parentBuilder.getClassName());
}
}
COM: <s> resolves the parent bean definition </s>
|
funcom_train/51346970 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public IIndex getJustificationIndex() {
if (!justify)
return null;
if (just == null) {
synchronized (this) {
// attempt to resolve the index and set the index reference.
if ((just = super.getIndex(getNamespace() + "." + NAME_JUST)) == null) {
throw new IllegalStateException();
}
}
}
return just;
}
COM: <s> the optional index on which </s>
|
funcom_train/18325796 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addOnEnterActionsTextPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_State_onEnterActionsText_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_State_onEnterActionsText_feature", "_UI_State_type"),
CoremodelPackage.Literals.STATE__ON_ENTER_ACTIONS_TEXT,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the on enter actions text feature </s>
|
funcom_train/9869763 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBloqueadodesde(java.util.Date newVal) {
if ((newVal != null && this.bloqueadodesde != null && (newVal.compareTo(this.bloqueadodesde) == 0)) ||
(newVal == null && this.bloqueadodesde == null && bloqueadodesde_is_initialized)) {
return;
}
this.bloqueadodesde = newVal;
bloqueadodesde_is_modified = true;
bloqueadodesde_is_initialized = true;
}
COM: <s> setter method for bloqueadodesde </s>
|
funcom_train/2947990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean exists(String name){
boolean scheduleExists=false;
Connection conn=null;
String sqlQuery;
try{
conn = ArtDBCP.getConnection();
sqlQuery = "SELECT AJS.JOB_MINUTE "+
" FROM ART_JOB_SCHEDULES AJS " +
" WHERE AJS.SCHEDULE_NAME = ?";
PreparedStatement ps = conn.prepareStatement(sqlQuery);
ps.setString(1,name);
ResultSet rs = ps.executeQuery();
if(rs.next()){
scheduleExists=true;
}
ps.close();
rs.close();
} catch(Exception e){
logger.error("Error",e);
} finally {
try {
if (conn != null){
conn.close();
}
} catch(Exception e) {
logger.error("Error",e);
}
}
return scheduleExists;
}
COM: <s> check if a schedule exists </s>
|
funcom_train/11774252 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean buildScenarioWARNING(){
if(sim.containsObjects()){
try {
System.out.println("WARNING. This will delete all object within the current simulation");
System.out.print("Are you sure you want to continue(y/N)?");
response = userInterface.readLine();
} catch (IOException e) {
System.out.println("IO Exception encountered.");
}
if(response.equalsIgnoreCase("Y")){
sim.removeAllObjects();
return true;
}
return false;
}
System.out.println();
return true;
}
COM: <s> this method displays a message the user informing them that they will </s>
|
funcom_train/4014958 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected DesignWidgetWrapper addNewTimeWidget(boolean select){
TimeWidget tb = new TimeWidget();
DOM.setStyleAttribute(tb.getElement(), "height","25"+PurcConstants.UNITS);
DOM.setStyleAttribute(tb.getElement(), "width","200"+PurcConstants.UNITS);
return addNewWidget(tb,select);
}
COM: <s> adds a new time widget to the selected page </s>
|
funcom_train/3927380 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getIntValue( int offset ) {
int result = 0;
int sign = 1;
int len = length( offset );
for ( int i = 0; i < len; i++ ) {
if (( i == 0 ) && ( charAt( i, offset ) == '-' )) {
sign = -1;
} else {
result = result*10 + ( charAt( i, offset ) - '0');
}
}
return( sign*result );
}
COM: <s> get the integer value of the token at a particular offset </s>
|
funcom_train/17805171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addExportedInterfacesPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_FunctionalComponent_ExportedInterfaces_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_FunctionalComponent_ExportedInterfaces_feature", "_UI_FunctionalComponent_type"),
CtbPackage.Literals.FUNCTIONAL_COMPONENT__EXPORTED_INTERFACES,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the exported interfaces feature </s>
|
funcom_train/22481086 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onModuleLoad() {
Editor editor = new Editor();
editor.setTextPixelSize(400, 300);
RootPanel.get().add(editor);
editor.setHTML("This is a sample text that you can edit. If you want edit this text then you need to click on the edit link.");
}
COM: <s> this is the entry point method </s>
|
funcom_train/38415117 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Drawable getWaveArcDrawable() {
if( waveDrawable!=null ) {
if( waveDrawable.isLive() ) {
waveDrawable.reset();
return null;
}
waveDrawable.reset();
return waveDrawable;
}
if(sprite==null) return null;
waveDrawable = new WaveArcDrawable( sprite, 40, Color.white,
ImageLibRef.WAVE_PRIORITY, 1.0f, (byte)3 );
return waveDrawable;
}
COM: <s> to get a wave drawable on this player </s>
|
funcom_train/25099158 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDimensionPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ValueType_dimension_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ValueType_dimension_feature", "_UI_ValueType_type"),
DatatypesPackage.Literals.VALUE_TYPE__DIMENSION,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the dimension feature </s>
|
funcom_train/12273656 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void controlEvent(int event) {
// Check if the wrapper manager is handling events
if ( WrapperManager.isControlledByNativeWrapper() == false) {
// The wrapper manager is not handling events, handle it here
if ( event == WrapperManager.WRAPPER_CTRL_C_EVENT ||
event == WrapperManager.WRAPPER_CTRL_CLOSE_EVENT ||
event == WrapperManager.WRAPPER_CTRL_SHUTDOWN_EVENT) {
// Stop the service
WrapperManager.stop(0);
}
}
}
COM: <s> handle control events </s>
|
funcom_train/8283983 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public WireFeed createWireFeed(String feedType) {
if (feedType==null) {
throw new IllegalArgumentException("Feed type cannot be null");
}
Converter converter = CONVERTERS.getConverter(feedType);
if (converter==null) {
throw new IllegalArgumentException("Invalid feed type ["+feedType+"]");
}
return converter.createRealFeed(this);
}
COM: <s> creates a real feed containing the information of the synd feed impl </s>
|
funcom_train/29882373 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean dsiZcommand(String pDsiCmdString) {
if (pDsiCmdString.contains(".")) {
// Contains at least one period. Might be a DSI Signature Block
return (dsiSignatureBlock(pDsiCmdString));
} else {
return false;
}
// TODO other (s,Z commands that are not the DSI Signature Block
}
COM: <s> process a dsi z command </s>
|
funcom_train/4531776 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(JobConf conf) throws IOException {
String tracker = conf.get("mapred.job.tracker", "local");
if ("local".equals(tracker)) {
this.jobSubmitClient = new LocalJobRunner(conf);
} else {
this.jobSubmitClient = createRPCProxy(JobTracker.getAddress(conf), conf);
}
}
COM: <s> connect to the default </s>
|
funcom_train/45451088 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCreateNull() throws Exception {
try {
new DateRange(null, TestDates.FEB_01_2004);
fail("DateRange created with null start Date");
} catch (RuntimeException e) {
}
try {
new DateRange(TestDates.JAN_01_2004, null);
fail("DateRange created with null start Date");
} catch (RuntimeException e) {
}
}
COM: <s> test attempting to create a date range with null start and end dates </s>
|
funcom_train/33814576 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getSalvarButton() {
if (salvarButton == null) {
salvarButton = new JButton();
salvarButton.setText("Salvar");
salvarButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
System.out.println("actionPerformed()"); // TODO Auto-generated Event stub actionPerformed()
formulario.salvaFormulario();
}
});
}
return salvarButton;
}
COM: <s> this method initializes salvar button </s>
|
funcom_train/5585702 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void log(int level, String msg, boolean lineFeed) {
if (getLoggingLevel() >= level) {
if (null != logFileWriter) {
if (lineFeed) {
logFileWriter.println(msg);
} else {
logFileWriter.print(msg);
}
}
}
}
COM: <s> prints a logging message if the specified logging level is lower or equal </s>
|
funcom_train/4443982 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEffort(long duration, long actual) {
long oldDuration = _effort;
this._effort = duration;
long oldActualDuration = _workedTime;
this._workedTime = actual;
_finishTime = Utils.countFinishTime(_startTime, _effort, getWorkload());
_finishTimeForTooltip = _finishTime-1;
if( (oldDuration != _effort) || (oldActualDuration != _workedTime) ){
_builder.setDirty();
}
}
COM: <s> sets task duration </s>
|
funcom_train/10519381 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector matches(String pattern, String input){
RegexpMatcher matcher = (RegexpMatcher)matchers.get(pattern);
if (matcher == null){
matcher = __reFactory.newRegexpMatcher();
matcher.setPattern(pattern);
matchers.put(pattern, matcher);
}
return matcher.getGroups(input);
}
COM: <s> return a group of matches of a given re in a string </s>
|
funcom_train/300520 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void bindTestWithoutOption() {
this.boundUiString.setDefaultOptions(UiString.OPTION_NONE);
this.boundUiString.clearBindParameters();
this.boundUiString.bind("Tom");
this.boundUiString.bind("Jerry");
// no quotes
assertEquals("Tom & Jerry", this.boundUiString.construct());
}
COM: <s> ensures that the non option binding is working properly </s>
|
funcom_train/8008958 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HtmlHiddenField getHiddenDescrField() {
try {
/** get the index of the edit field so we can replace it */
int editIndex = _componentsVec.indexOf(_hiddenDescriptionHandle);
if (editIndex != -1) {
return (HtmlHiddenField) _componentsVec.elementAt(editIndex);
}
} catch (Exception e) {
MessageLog.writeErrorMessage("getHiddenDescrField", e, this);
}
return null;
}
COM: <s> this method returns the hidden description filed </s>
|
funcom_train/23869868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getDataLength() {
int length = 0;
length += _dummySyncData.getDataSize();
for (Packet packet : _packets) {
length += (4 + packet.getNumWords() * 4); // 4 bytes for the header, plus the data size
}
return length;
}
COM: <s> get the data length of the bitstream </s>
|
funcom_train/13478297 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setChokeNumber(int chokeNumber) {
int oldChoke = getChokeNumber();
super.setChokeNumber(chokeNumber);
this.support.firePropertyChange("chokeNumber", oldChoke, chokeNumber); //$NON-NLS-1$
config.setValue("choke_number", "" + chokeNumber); //$NON-NLS-1$//$NON-NLS-2$
}
COM: <s> overridden for property change support and saving </s>
|
funcom_train/43899162 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(final Object object) {
if (object == this) {
// Slight optimization.
return true;
}
if ((object != null) && object.getClass().equals(getClass())) {
final GeneralGridCoordinates that = (GeneralGridCoordinates) object;
return Arrays.equals(this.coordinates, that.coordinates);
}
return false;
}
COM: <s> compares this grid coordinates with the specified object for equality </s>
|
funcom_train/2903863 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(XMLTag spec){
if(spec.tag.compareTo("name")==0){
name = spec.value.toString();
}
else if(spec.tag.compareTo("themeColor")==0){
themeColor = spec.value.toString();
}
else if(spec.tag.compareTo("title")==0){
title = spec.value.toString();
}
else if(spec.tag.compareTo("comment")==0){
comment = spec.value.toString();
}
else if(spec.tag.compareTo("sample")==0){
sample = spec.value.toString();
}
}
COM: <s> initialize look and feel with a single property tag </s>
|
funcom_train/3561022 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String rtn = "";
for (int i = 0; i < values.length; i++) {
if (i != 0) {
rtn += ", ";
}
rtn += table.names[i] + "=";
if (values[i] != null) {
rtn += "'";
}
rtn += values[i];
if (values[i] != null) {
rtn += "'";
}
}
return rtn;
}
COM: <s> converts this row in a string </s>
|
funcom_train/31910585 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRenderingHint(RenderingHints.Key key, Object value) {
fireGraphicsNodeChangeStarted();
if (this.hints == null) {
this.hints = new RenderingHints(key, value);
} else {
hints.put(key, value);
}
fireGraphicsNodeChangeCompleted();
}
COM: <s> maps the specified key to the specified value in the rendering hints of </s>
|
funcom_train/29064386 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean validatePointcutTypesEnum_Enumeration(Object pointcutTypesEnum, DiagnosticChain diagnostics, Map<Object, Object> context) {
boolean result = POINTCUT_TYPES_ENUM__ENUMERATION__VALUES.contains(pointcutTypesEnum);
if (!result && diagnostics != null)
reportEnumerationViolation(AspectxPackage.Literals.POINTCUT_TYPES_ENUM, pointcutTypesEnum, POINTCUT_TYPES_ENUM__ENUMERATION__VALUES, diagnostics, context);
return result;
}
COM: <s> validates the enumeration constraint of em pointcut types enum em </s>
|
funcom_train/129064 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int nextTag() throws ParseException, IOException {
next();
if (eventType == TEXT && isWhitespace()) { // skip whitespace
next();
}
if (eventType != START_TAG && eventType != END_TAG) {
throw new ParseException("expected START_TAG or END_TAG not "
+ TYPES[getEventType()], this.lineNumber);
}
return eventType;
}
COM: <s> next tag always returns either start tag or end tag </s>
|
funcom_train/25494847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int toView(JTable table, int mColIndex) {
for (int c=0; c<table.getColumnCount(); c++) {
TableColumn col = table.getColumnModel().getColumn(c);
if (col.getModelIndex() == mColIndex) {
return c;
}
}
return -1;
}
COM: <s> converts a column index in the model to a visible column index </s>
|
funcom_train/21633957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ConcurrentTrainingPerformer waitForFreePerformer() {
try {
this.accessLock.lock();
ConcurrentTrainingPerformer result = null;
while (result == null) {
for (final ConcurrentTrainingPerformer performer : this.performers) {
if (performer.ready()) {
result = performer;
}
}
if (result == null) {
try {
this.mightBeDone.await();
} catch (final InterruptedException e) {
return null;
}
}
}
return result;
} finally {
this.accessLock.unlock();
}
}
COM: <s> wait for a free performer </s>
|
funcom_train/13479477 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(int what) {
if ((what & UPDATE_ACCESS_DUMP) != 0) {
updateAccess(); // FIXME: restrict what flags have to be updated
}
if ((what & UPDATE_ACCESS_COMMANDS) != 0) {
updateAccess(); // FIXME: restrict what flags have to be updated
}
if (settlement != null) {
settlement.update(what);
}
}
COM: <s> update secondary values and access flags for this planetoid </s>
|
funcom_train/21898905 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String resolveString(String iText, Object... iArgs) {
if (iText != null && iText.startsWith(VARNAME_PREFIX)) {
// VARNAME_PREFIX FOUND: RESOLVE THE LABEL WITH I18N SETTINGS
iText = getString(iText.substring(VARNAME_PREFIX.length()));
if (iText != null && iArgs != null && iArgs.length > 0)
iText = new ObjectVariableResolver(iText).resolveVariables(iArgs);
}
return iText;
}
COM: <s> resolve a string using the i18 n </s>
|
funcom_train/38551514 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void log(LogEntryCollection logEntryCollection) {
if(logEntryCollection != null) {
Iterator iter = logEntryCollection.iterator();
LogEntry entry;
while (iter.hasNext()) {
entry = (LogEntry)iter.next();
addEntry(entry);
}
this.scrollDown();
}
}
COM: <s> logs a collection of entries </s>
|
funcom_train/8305908 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void appendDetail(StringBuffer buffer, String fieldName, long[] array) {
buffer.append(arrayStart);
for (int i = 0; i < array.length; i++) {
if (i > 0) {
buffer.append(arraySeparator);
}
appendDetail(buffer, fieldName, array[i]);
}
buffer.append(arrayEnd);
}
COM: <s> p append to the code to string code the detail of a </s>
|
funcom_train/51139164 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
return "com.ledruide.druidedb.test.dao.Person { " +
"[firstname = '" + firstname + "'] *** " +
"[lastname = '" + lastname + "'] *** " +
"[sex = '" + sex + "'] *** " +
"[age = '" + age + "'] *** " +
"}";
}
COM: <s> returns a human readable string representation of the content </s>
|
funcom_train/12310584 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isEnabled(IInstallConfiguration config) {
if (nativeUpgrade)
return true;
if (isOptional() && oldFeatureRef != null) {
try {
IFeature oldFeature = oldFeatureRef.getFeature(null);
IConfiguredSite csite =
UpdateUtils.getConfigSite(oldFeature, config);
return csite.isConfigured(oldFeature);
} catch (CoreException e) {
}
}
return true;
}
COM: <s> returns true if this optional feature should </s>
|
funcom_train/32612305 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @SuppressWarnings("unchecked")
public void serializeNames(Resource root, Vector nameVector) {
if (nameVector == null) {
throw new IllegalArgumentException("Names: Name vector not allowed to be null");
}
for (Object name : nameVector) {
serializeName(root, name);
}
}
COM: <s> serializes a name vector uddi name as defined in 2 </s>
|
funcom_train/35066490 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadXml(String fileName) throws CoreException {
if(fileName == null) {
return;
}
st = new StopTimer();
// clear markers
clearMarkers(null);
final Project findBugsProject = new Project();
final Reporter bugReporter = new Reporter(javaProject, monitor);
bugReporter.setPriorityThreshold(userPrefs.getUserDetectorThreshold());
reportFromXml(fileName, findBugsProject, bugReporter);
// Merge new results into existing results.
updateBugCollection(findBugsProject, bugReporter, false);
monitor.done();
}
COM: <s> load existing find bugs xml report for the given collection of files </s>
|
funcom_train/45935540 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void generateClassFiles() {
// Generate files for single classes specified on the command line.
for (String packageName : conf.classDocCatalog.packageNames())
generateClassFiles(Arrays.asList(conf.classDocCatalog.allClasses(packageName)));
// Generate files for package names specified on the command line.
for (PackageDoc packageDoc : conf.root.specifiedPackages())
generateClassFiles(Arrays.asList(packageDoc.allClasses()));
}
COM: <s> generate class documentation for packages and singly specified classes </s>
|
funcom_train/31678762 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Complex divide(Complex that) {
double tmp = (that._real * that._real)
+ (that._imaginary * that._imaginary);
double thatInvReal = that._real / tmp;
double thatInvImaginary = -that._imaginary / tmp;
Complex c = FACTORY.object();
c._real = this._real * thatInvReal - this._imaginary * thatInvImaginary;
c._imaginary = this._real * thatInvImaginary + this._imaginary
* thatInvReal;
return c;
}
COM: <s> returns this complex divided by the specified complex </s>
|
funcom_train/39198187 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getStyleClass() {
IGridSortState.Direction direction = getSortDirection();
if (direction == IGridSortState.Direction.ASC) {
return "imxt-sort-header imxt-sort-header-asc";
} else if (direction == IGridSortState.Direction.DESC) {
return "imxt-sort-header imxt-sort-header-desc";
} else {
return "imxt-sort-header imxt-sort-header-none";
}
};
COM: <s> returns the css class for the link element depending on the sort state </s>
|
funcom_train/35812399 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void assertTruncateDependentTables(Database db) {
assertNotNull(db);
assertTrue(db.isConnected());
assertTrue(truncateTable(db, "users"));
assertTrue(truncateTable(db, "rooms"));
assertTrue(truncateTable(db, "visits"));
assertTrue(truncateTable(db, "nicks"));
assertTrue(truncateTable(db, "chat_messages"));
assertTrue(truncateTable(db, "permissions"));
}
COM: <s> truncates users rooms visits nicks chat messages and </s>
|
funcom_train/7616291 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected AWTEvent coalesceEvents(AWTEvent existingEvent, AWTEvent newEvent) {
toolkit.lockAWT();
try {
// Nothing to do:
// 1. Mouse events coalesced at WTK level
// 2. Paint events handled by RedrawManager
// This method is for overriding only
return null;
} finally {
toolkit.unlockAWT();
}
}
COM: <s> coalesces the existed event with new event </s>
|
funcom_train/51142140 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void performCompoundEdit(JTextComponent comp, CompoundEditOperation op, boolean undoOnError) {
boolean error = false;
startCompoundEdit(comp);
try {
op.doEdit();
} catch (Throwable t) {
error = true;
op.onError(t);
} finally {
endCompoundEdit(comp);
if (error && undoOnError)
getUndoManager(comp).undo();
}
}
COM: <s> if var undo on error var is true any edits that occured during </s>
|
funcom_train/12110166 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void connEtoC6(java.awt.event.ActionEvent arg1) {
try {
// user code begin {1}
// user code end
this.modJButton_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 c6 mod jbutton </s>
|
funcom_train/3471393 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JTextArea addTextAreaRow(String labelText, int rows, int columns) {
JTextArea textArea = new JTextArea("", rows, columns);
JScrollPane scrollPane = new JScrollPane(textArea);
addLabeledComponentRow(labelText, scrollPane);
return textArea;
}
COM: <s> adds a text area row to the editors component </s>
|
funcom_train/48071861 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clear(Widget w, boolean drillDown) {
if(drillDown) {
List<MsgPanel> list = findContainedMsgPanels(w, PopupState.EITHER);
if(list == null) return;
for(MsgPanel mp : list) {
mp.hide();
msgPanels.remove(mp);
}
}
else {
MsgPanel mp = findMsgPanel(w.getElement());
if(mp != null) {
mp.hide();
msgPanels.remove(mp);
}
}
}
COM: <s> clears all found </s>
|
funcom_train/34341166 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getVentaS1() {
if (VentaS1 == null) {//GEN-END:|43-getter|0|43-preInit
// write pre-init user code here
VentaS1 = new TextField("Venta Semana 1:", null, 16, TextField.ANY);//GEN-LINE:|43-getter|1|43-postInit
// write post-init user code here
}//GEN-BEGIN:|43-getter|2|
return VentaS1;
}
COM: <s> returns an initiliazed instance of venta s1 component </s>
|
funcom_train/15627580 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Component createNetPanel() {
final JComponent panel = new JPanel(new GridBagLayout());
final PreferencesHelper preferencesHelper = new PreferencesHelper(panel);
panel.setBorder(createTitledBorder("optionsNetProxy"));
preferencesHelper.addComponent(proxyType);
preferencesHelper.addComponent(proxyHost);
preferencesHelper.addComponent(proxyPort);
return panel;
}
COM: <s> creates the sub panel with the external applications </s>
|
funcom_train/20766888 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void labelLeftEye (AEPacketRaw aeRaw){
int[] adr = aeRaw.getAddresses();
int n = aeRaw.getNumEvents();
for ( int i = 0 ; i < n ; i++ ){
adr[i] = (int)( adr[i] & ~Stereopsis.MASK_RIGHT_ADDR );
}
}
COM: <s> labels events as coming from left eye </s>
|
funcom_train/39163684 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object guessDocName(Object docID){
//the doc ID is most likely the persistence ID for the doc
Corpus corpus = target.getCorpus();
DataStore ds = corpus.getDataStore();
if(ds != null){
try{
return ds.getLrName(docID);
}catch(Exception e){}
}
//we couldn't guess anything
return docID;
}
COM: <s> attempts to guess the document name from the id returned by the searcher </s>
|
funcom_train/25326996 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String registerTempTrace(UUID traceID) {
if (traceID != null) {
String fileName = null;
String tempId = traceID.toString();
try {
tempFileDirectoryLock.readLock().lock();
fileName = tempFileDirectory + tempId + ".pcap";
if (registerNewTrace(fileName, traceID)) {
return fileName;
}
return null;
} finally {
tempFileDirectoryLock.readLock().unlock();
}
} else {
logger.error("registerTempTrace() received null reference.");
}
return null;
}
COM: <s> registers a new temporary trace </s>
|