__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/3169427 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addElements(int to, PrimArithmeticArray other, int count, int from) {
int n = Math.min(other.count() - from, this.count() - to);
if (count > n) {
throw new IndexOutOfBoundsException();
}
if (count >= 0) {
n = count;
}
addData(to, other, from, n);
}
COM: <s> arithmetic addition of the respective elements of other </s>
|
funcom_train/22448698 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addIsStartPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Component_isStart_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Component_isStart_feature", "_UI_Component_type"),
ModelPackage.Literals.COMPONENT__IS_START,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the is start feature </s>
|
funcom_train/31106494 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getAllSrcMethods() {
List methods = new ArrayList();
methods.addAll( getSrcClass().getMethods() );
if (getSrcCmpInnerClass() != null) {
methods.addAll( getSrcCmpInnerClass().getMethods() );
}
return methods;
}
COM: <s> get methods from the src class and any inner cmp class </s>
|
funcom_train/22496125 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setupPerspective(final Renderer renderer, int width, int height) {
float aspect = (float) width / (float) height;
logger.trace("setupPerspective: fov=" + fov + "; nearPlane=" + nearPlane + "; farPlane=" + farPlane + "; width=" + width + "; height=" + height);
GLU.gluPerspective(renderer, fov, aspect, // Aspect ratio
nearPlane, farPlane);
}
COM: <s> applies camera perspective </s>
|
funcom_train/44598694 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test11() {
s.setSource(" requires /*@@@ requires \n @@@ requires@@*/ requires ");
assertTokens(s, new int[] {
JmlScanner.TokenNameIdentifier,
JmlScanner.JML_BEGIN_SPECIFICATION,
JmlScanner.JML_REQUIRES,
JmlScanner.JML_REQUIRES,
JmlScanner.JML_END_SPECIFICATION,
JmlScanner.TokenNameIdentifier,
JmlScanner.TokenNameEOF,
});
}
COM: <s> an ending token followed immediately by </s>
|
funcom_train/3122441 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected State getOrCreateState(String strStateName) {
State s = getState(strStateName);
if (s == null) {
s = new State(strStateName);
mapStates.put(strStateName, s);
s.setFiniteStateAutomata(this);
}
return (s);
} // of method
COM: <s> given a name get a state or create it if it doesnt exist </s>
|
funcom_train/3350772 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public T getKeyboardEventAction(KeyboardEvent event) {
char ch = event.getKeyChar();
if (ch == KeyEvent.CHAR_UNDEFINED) {
return getVKAction(event.getKeyCode(), event.getModifiers());
} else {
return getCharAction(ch);
}
}
COM: <s> lookup the action for a given keyboard event </s>
|
funcom_train/10019487 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUseItsOwnXBRLSchemas() throws Exception {
EXISchema corpus =
EXISchemaFactoryTestUtil.getEXISchema("/xbrlBareBone.xsd", getClass());
/**
* XMLSchema, XMLSchema-instance, urn:foo, xbrli
*/
Assert.assertEquals(4, corpus.getNamespaceCountOfSchema());
}
COM: <s> always use bundled xbrl schemas instead of those specified by the </s>
|
funcom_train/15836118 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private BigDecimal calculateTax(TaxGroupRule groupRule, BigDecimal amount) {
String usageCode = groupRule.getTaxRateRuleUsageCode();
if (usageCode != null && usageCode.equals(TaxConstants.USAGE_TAX_TABLE)) {
return calculateTaxTable(groupRule, amount);
} else {
return calculatePickOne(groupRule, amount);
}
}
COM: <s> calculate tax amount given the group rule and taxable amount using </s>
|
funcom_train/50884245 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void validateCommandLine() throws Exception {
if (destDir == null) {
throw new Exception("missing -d argument");
}
if (template == null) {
throw new Exception("missing -t argument");
}
if (sourceFiles.length == 0) {
throw new Exception("no source-files provided");
}
}
COM: <s> check that we have all the required args </s>
|
funcom_train/18736349 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public static final IMessageRenderer MESSAGE_WIDELINE = new IMessageRenderer() {
public String toString() { return "MESSAGE_WIDELINE"; }
public String renderToString(IMessage message) {
if (null == message) {
return "((IMessage) null)";
}
return renderMessageLine(message, 8, 2, 255); // XXX revert to 256
}
};
COM: <s> render message as wide line i </s>
|
funcom_train/27755092 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void paintLine(int line, int y, int lineheight, GC gc, Display display) {
int widgetLine= JFaceTextUtil.modelLineToWidgetLine(fCachedTextViewer, line);
String s= createDisplayString(line);
int indentation= fIndentation[s.length()];
int baselineBias= getBaselineBias(gc, widgetLine);
gc.drawString(s, indentation, y + baselineBias, true);
}
COM: <s> paints the line </s>
|
funcom_train/6490089 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ScoreGraphFunction getFunction() {
LogTools.trace(logger, 25, "ScoreGraph.getFunction()");
if (_function == null) {
LogTools.error(logger, "ScoreGraph.getFunction() - Null _function. This is bad news.");
return null;
}
return _function;
}
COM: <s> return the function associated with this i scoregraph i </s>
|
funcom_train/16094789 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isValidUser() {
MySQLPassword pwd = new MySQLPassword(this.salt,this.getClearPassword());
//System.out.println("\n[Dispatcher] I crypted "+pwd.getScrambledPassword()+", I received: "+password_crypted+"\n");
return (pwd.getScrambledPassword().equals(new String(this.password_crypted)));
}
COM: <s> check whether the encrypted password the client </s>
|
funcom_train/51434211 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String normalizeFormula(String formula) {
if (formula.equals("")) return "";
try {
MFAnalyser mfa = new MFAnalyser(formula,new Molecule());
//this is to make the formula "canonical" (i.e. sorted in the right order)
mfa = new MFAnalyser(mfa.getAtomContainer());
formula = mfa.getMolecularFormula();
return formula;
} catch (Exception x) {
return "";
}
}
COM: <s> regenerates a formula in a right order c h </s>
|
funcom_train/31739606 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getDirection(User user) throws IllegalArgumentException {
for (int i = 0; i < NUM_PLAYERS; i++) {
if (players[i] != null && players[i].getUser().equals(user)) {
return players[i].getDirection();
}
}
throw new IllegalArgumentException("User not contained by this Players instance");
}
COM: <s> returns the direction of the given user </s>
|
funcom_train/49461471 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getCorrectPriorityId(Db db, String priority) throws Exception{
try {
db.enter();
st_get_rec_priority.setString(1, priority);
Integer ret = DbHelper.getKey(st_get_rec_priority);
if(ret != null)
return ret.intValue();
//the priority doesn't exists
_logger.warn("Priority "+priority+" not found. Using default priority");
return DEFAULT_priority;
}
finally {
db.exit();
}
}
COM: <s> get the priority id corresponding to this label </s>
|
funcom_train/1453488 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setId(java.lang.String id) {
synchronized (monitor()) {
check_orphaned();
org.apache.xmlbeans.SimpleValue target = null;
target = (org.apache.xmlbeans.SimpleValue) get_store()
.find_attribute_user(ID$0);
if (target == null) {
target = (org.apache.xmlbeans.SimpleValue) get_store()
.add_attribute_user(ID$0);
}
target.setStringValue(id);
}
}
COM: <s> sets the id attribute </s>
|
funcom_train/5728997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object object) {
if (this == object) {
return true;
}
if (!(object instanceof CourseMember)) {
return false;
}
final CourseMember that = (CourseMember) object;
if (this.courseMemberPk == null || that.getCourseMemberPk() == null
|| !this.courseMemberPk.equals(that.getCourseMemberPk())) {
return false;
}
return true;
}
COM: <s> returns code true code if the argument is an course member instance and </s>
|
funcom_train/43344435 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(IoBuffer buffer) {
// FLV
buffer.put(signature);
// version
buffer.put(version);
// flags
buffer.put((byte) (FLV_HEADER_FLAG_HAS_AUDIO * (flagAudio ? 1 : 0) + FLV_HEADER_FLAG_HAS_VIDEO * (flagVideo ? 1 : 0)));
// data offset
buffer.putInt(9);
// previous tag size 0 (this is the "first" tag)
buffer.putInt(0);
buffer.flip();
}
COM: <s> writes the flvheader to io buffer </s>
|
funcom_train/11693160 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean identicalLabel() {
if (isEmpty()) {
return true;
}
int label = get(0).getLabel();
for (int index = 1; index < size(); index++) {
if (get(index).getLabel() != label) {
return false;
}
}
return true;
}
COM: <s> checks if all the vectors have identical label values </s>
|
funcom_train/51632094 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void handleInputChanged() {
final JarImportData data= fWizard.getImportData();
data.setRefactoringHistory(null);
data.setRefactoringFileLocation(null);
setErrorMessage(null);
setMessage(null, NONE);
setPageComplete(true);
handleJarFileChanged();
if (isPageComplete())
handlePackageFragmentRootChanged();
if (fImportWizard && !fTreeViewer.getControl().isEnabled())
setErrorMessage(JarImportMessages.JarImportWizardPage_no_jar_files);
fFirstTime= false;
getContainer().updateButtons();
}
COM: <s> handles the input changed event </s>
|
funcom_train/10385399 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDefaultHost(String host) {
String oldDefaultHost = this.defaultHost;
if (host == null) {
this.defaultHost = null;
} else {
this.defaultHost = host.toLowerCase(Locale.ENGLISH);
}
support.firePropertyChange("defaultHost", oldDefaultHost,
this.defaultHost);
}
COM: <s> set the default host </s>
|
funcom_train/30259250 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public long getNextVal(String sequenceName, Connection connection) throws Exception {
PreparedStatement statement = connection.prepareStatement(
"SELECT " + sequenceName + ".NEXTVAL FROM DUAL"
);
ResultSet rs = statement.executeQuery();
long sequenceValue = 0;
if ( rs.next() ) {
sequenceValue = rs.getLong( "NEXTVAL" );
}
else {
throw new Exception( "error retrieving sequence value" );
}
statement.close();
return sequenceValue;
}
COM: <s> get next value from specified sequence </s>
|
funcom_train/40881125 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearGlyphs () {
for (int i = 0; i < PAGES; i++)
glyphs[i] = null;
for (Iterator iter = glyphPages.iterator(); iter.hasNext();) {
GlyphPage page = (GlyphPage)iter.next();
page.getTexture().dispose();
}
glyphPages.clear();
if (baseDisplayListID != -1) {
GL11.glDeleteLists(baseDisplayListID, displayLists.size());
baseDisplayListID = -1;
}
queuedGlyphs.clear();
missingGlyph = null;
}
COM: <s> clears all loaded and queued glyphs </s>
|
funcom_train/7901767 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Map getInput() {
Map m = new HashMap();
for (String k : input.keySet()) {
Object value = input.get(k);
if (value != null) {
if (((Object[])value).length == 1) {
value = ((Object[])value)[0];
} else if (((Object[])value).length == 0) {
value = null;
}
}
m.put(k, value);
}
return m;
}
COM: <s> provides a copy of the input map </s>
|
funcom_train/9985183 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkMatchId( Message msg ) {
if (realMatch == null)
throw new RuntimeException("Found no running match.");
else if (msg == null)
throw new RuntimeException("Null message received.");
if ( !realMatch.matchId.equals( msg.getMatchId() ) )
System.out.println( STR_ERROR1 + msg.getMatchId() );
}
COM: <s> this method is for error checking nothing more </s>
|
funcom_train/1099034 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void processDeploymentFinished(boolean aBool) {
// Call super.processDeploymentFinished() after this logic so that the
// pddName is still valid.
DeploymentInfo depInfo = mDeployInfoMap.get(getPddName());
depInfo.setDeployed(aBool);
depInfo.setLog(mBuffer.toString());
mBuffer = new StringBuffer();
super.processDeploymentFinished(aBool);
}
COM: <s> overrides method to set the deployed flag on the deployment info object </s>
|
funcom_train/10875363 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int topDocsSize() {
// In case pq was populated with sentinel values, there might be less
// results than pq.size(). Therefore return all results until either
// pq.size() or totalHits.
return totalHits < pq.size() ? totalHits : pq.size();
}
COM: <s> the number of valid pq entries </s>
|
funcom_train/20271380 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Scope getScopeDeclaredIn() {
int dotIndex = fnName.indexOf(".");
if (dotIndex != -1) {
String rootVarName = fnName.substring(0, dotIndex);
Var rootVar = scope.getVar(rootVarName);
if (rootVar != null) {
return rootVar.getScope();
}
}
return scope;
}
COM: <s> the scope that we should declare this function in if it needs </s>
|
funcom_train/2573000 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void connect(String host, int port) throws IOException {
if (debug > 0)
System.err.println("Wrapper: connect(" + host + "," + port + ")");
try {
socket = new java.net.Socket(host, port);
in = socket.getInputStream();
out = socket.getOutputStream();
} catch (Exception e) {
System.err.println("Wrapper: " + e);
disconnect();
throw ((IOException) e);
}
}
COM: <s> connect the socket and open the connection </s>
|
funcom_train/32157960 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getLoadResultsMenuItem() {
if (loadResultsMenuItem == null) {
loadResultsMenuItem = new JMenuItem();
loadResultsMenuItem.setText("Load Results");
loadResultsMenuItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
CardLayout cards = (CardLayout) getNorthPanel().getLayout();
cards.show(getNorthPanel(), RESULTS_PANEL);
}
});
}
return loadResultsMenuItem;
}
COM: <s> this method initializes load results menu item </s>
|
funcom_train/7275807 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getAnEndpoint(EndpointObserver observer) {
Endpoint p;
// We can only lock around endpoint retrieval & _catchersWaiting,
// we don't want to expose our lock to the observer.
synchronized(this) {
p = getAnEndpointInternal();
if(p == null)
_catchersWaiting.add(observer);
}
if(p != null)
observer.handleEndpoint(p);
}
COM: <s> passes the next available endpoint to the endpoint observer </s>
|
funcom_train/10533071 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetResource() {
org.apache.beehive.controls.runtime.webcontext.ControlBeanContextSupport cbcs = getContext();
ControlBeanContextChildSupport child = new ControlBeanContextChildSupport();
assertTrue(cbcs.add(child));
URL location = cbcs.getResource("org/apache/beehive/controls/test/controls/beancontext/Resource.txt", child);
assertNotNull(location);
}
COM: <s> test the get resource bean context api </s>
|
funcom_train/4557816 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLoginClickForgotPasswordLink() {
repEng.newStep("294", "Login-Click Forgot Password link");
//1. Launch http://hobbes.ontometrics.com/magnetportal/
//2. Click the Manage You Assets link.
//3. Click the Publish Magnet link in the Albums/Tracks page.
//4. Click the cart icon.
//5. Click Login button.
//6. Click Forgot Password link.
// There will popup "Forgot Password" window.
// OK button is disabled by default.There will popup search window.
}
COM: <s> 294 login click forgot password link </s>
|
funcom_train/34265313 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setCheckBoxState(boolean p_aCheckBoxState) {
for(int i = 0; this.getFlywheelCheckBoxList().length > i; i++) {
this.getFlywheelCheckBoxList()[i].setSelected(p_aCheckBoxState);
this.getFlywheelCheckBoxList()[i].setUpBackground();
}
}
COM: <s> sets the state of the checkbaox based on the boolean </s>
|
funcom_train/3111020 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTopBranch(StandardEnforcingBranchGroup bg) {
//TODO: Remove temp fix
if (bg == null) {
bg = new StandardEnforcingBranchGroup();
}
if (root == null) {
locale.addBranchGraph(bg);
} else {
locale.replaceBranchGraph(root, bg);
}
root = bg;
}
COM: <s> sets the top branch group </s>
|
funcom_train/30245120 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getModifiedWeight() {
float w = getWeight();
w += getModifier().getWeight();
Status s = getStatus();
if(s==null) {
s = Status.uncursed;
}
switch(s) {
case cursed:
w += w/3;
break;
case blessed:
w -= w/3;
break;
}
return w;
}
COM: <s> gets the modified weight of this item in pounds </s>
|
funcom_train/32978765 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getSampleNbrBySampleName(String sampleName)
{ /* getSampleNbrBySampleName */
for(int i=0; i<allSampleNames.length;i++)
if(allSampleNames[i].equals(sampleName))
return(i);
return(-1); /* failed */
} /* getSampleNbrBySampleName */
COM: <s> get sample nbr by sample name lookup the sample by its name </s>
|
funcom_train/22639305 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addAllXmlvmEmittingProcessesAsInput() {
if (!arguments.option_use_jvm()) {
addSupportedInput(OptimizationOutputProcess.class);
} else {
addSupportedInput(ClassToXmlvmProcess.class);
}
addSupportedInput(ExeToXmlvmProcess.class);
addSupportedInput(XmlvmToXmlvmProcess.class);
}
COM: <s> adds all processes that emit xmlvm as potential input processes </s>
|
funcom_train/30054396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void indexToPointer() throws GraphException {
for (NodeImpl node : this.nodes) {
node.indexToPointer();
}
for (PortImpl port : this.ports) {
port.indexToPointer();
}
for (EdgeImpl edge : this.edges) {
edge.indexToPointer();
}
}
COM: <s> converts indexes to references </s>
|
funcom_train/11345061 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Class loadClass(String className) throws ClassNotFoundException {
if (m_clazz != null && m_classname.equals(className)) { // Immutable fields.
return defineClass(className, m_clazz, null);
}
return m_context.getBundle().loadClass(className);
}
COM: <s> loads a class </s>
|
funcom_train/11741358 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void validateAttributes() {
if (destDir == null) {
throw new CayenneRuntimeException("'destDir' attribute is missing.");
}
if (!destDir.isDirectory()) {
throw new CayenneRuntimeException("'destDir' is not a directory.");
}
if (!destDir.canWrite()) {
throw new CayenneRuntimeException("Do not have write permissions for "
+ destDir);
}
}
COM: <s> validates the state of this class generator </s>
|
funcom_train/9774615 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawTransp(Renderer renderer){
for (Iterator<Drawable3D> d = lists[Drawable3D.DRAW_TYPE_SURFACES].iterator(); d.hasNext();)
d.next().drawTransp(renderer);
for (Iterator<Drawable3D> d = lists[Drawable3D.DRAW_TYPE_CLOSED_SURFACES].iterator(); d.hasNext();)
d.next().drawTransp(renderer);
view3D.drawTransp(renderer);
}
COM: <s> draw surfaces as transparent parts </s>
|
funcom_train/5580591 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setHost(Host h) {
_unregisterListeners();
_cowner.setSelectedUser(Integer.parseInt(h.getUid()));
_cip.setSelectedIP(h.getIP());
_thostname.setText(h.getHostName());
_tmac.setText(h.getMACAddr().toString());
_oschooser.setOperatingSystem(h.getOperatingSystem());
_losname.setText(h.getOperatingSystem().toString());
_host = h;
setNew(false);
_registerListeners();
}
COM: <s> set the host to display br </s>
|
funcom_train/26416160 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRun_store_throw() throws Exception {
final IOException ioex = new IOException("nyargh!");
MyInputStream izzy = new MyInputStream();
izzy.ioex = ioex;
ReportLineCollector colly = new ReportLineCollector(izzy);
// wait for collection to stop
colly.innerThread.join(2000);
assertTrue("read not called", izzy.readCalled);
assertSame("wrong exception", ioex, colly.caught);
assertTrue("thread still alive", ! colly.innerThread.isAlive());
}
COM: <s> see that if an ioexception occurs in run it is </s>
|
funcom_train/2437697 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Node createPreConditionNode(String path) {
Node node = new Node(m_TreeComponent, this, 0, (isXml() ? "[P] " : "") + c_sCondition, false, path, "P", false);
node.setPreconditionFlag();
return node;
}
COM: <s> creates a pre condition node with the given path </s>
|
funcom_train/28352233 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void willGenerateKnob( final BumpGenerator generator, final AcceleratorNode node ) {
try {
SwingUtilities.invokeAndWait( new Runnable() {
public void run() {
PROGRESS_BAR.setMaximum( BUMP_GENERATOR.getBumpCount() );
PROGRESS_BAR.setString( node.getId() );
}
});
}
catch( Exception exception ) {
exception.printStackTrace();
}
}
COM: <s> handle the event indicating that a new knob is about to be generated </s>
|
funcom_train/38952810 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(String cssBlock) {
Matcher m = cssPattern.matcher(cssBlock);
while (m.find()) {
String selectorList = m.group(1).trim();
String styleList = m.group(2).trim();
String[] styles = styleList.split(";");
for (int i = 0; i < styles.length; i++) {
styles[i] = styles[i].trim() + ";";
}
String[] selectors = selectorList.split(",");
for (String selector : selectors) {
items.add(new CssItem(selector.trim(), styles));
}
}
}
COM: <s> takes a block of css and parses out individual rules and adds them </s>
|
funcom_train/12118172 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void connEtoC56(java.awt.event.ActionEvent arg1) {
try {
// user code begin {1}
// user code end
this.indScalaMobileJMenuItem_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 c56 ind scala mobile jmenu item </s>
|
funcom_train/49608792 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HealthData updateHealthData(String username,EntityManager em,HealthData vo) throws Throwable {
try {
return (HealthData)JPAMethods.merge(em, username, DefaultFieldsCallabacks.getInstance(), vo);
}
catch (Throwable ex) {
Logger.error(null, ex.getMessage(), ex);
throw ex;
}
finally {
em.flush();
}
}
COM: <s> update health data object </s>
|
funcom_train/650641 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Version getCurrentVersion() {
Version ver_ = new Version("1.0");
Connection conn = null;
try {
conn = da.getConnection ( );
Statement st = conn.createStatement ();
ResultSet rs = st.executeQuery("select database from version");
if(rs.next()){
ver_ = new Version(rs.getString("database"));
}
st.close ( );
conn.close ( );
} catch (SQLException e) {
LOG.debug(e.getMessage());
}
return ver_;
}
COM: <s> gets current database version </s>
|
funcom_train/51189122 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void pipe(OutputStream out) throws IOException {
while (!_eof) {
int avail = _avail - _pos;
if (avail <= 0) {
fill();
avail = _avail - _pos;
}
if (avail > 0) {
out.write(_buf, _pos, avail);
_pos += avail;
}
}
}
COM: <s> dump remaining input to output utilising our buffer </s>
|
funcom_train/50531713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean accept(File f) {
String fileName = f.getName();
boolean retVal =
((dlgGenSource.getFileSelectionMode() == JFileChooser
.FILES_AND_DIRECTORIES) && f.isDirectory())
|| fileName.toLowerCase().endsWith(".java");
return retVal;
}
COM: <s> this method determines whether or not the given file is accepted by </s>
|
funcom_train/25710019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeSequences(File outFile) {
Fasta outFasta = new Fasta(fastaRG, sequences);
outFasta.save(outFile);
int[] values = {outFasta.size(), outFasta.length()};
binningFasta.writeNumbersDat(numbers, values);
sequenceVals = values;
}
COM: <s> retrieve the appropriate sequence data from the input file and write </s>
|
funcom_train/44771294 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addBooleanValue(Document doc, String fieldName, Object internalValue) {
doc.add(new Field(FieldNames.PROPERTIES,
FieldNames.createNamedValue(fieldName, internalValue.toString()),
false,
true,
false));
}
COM: <s> adds the string representation of the boolean value to the document as </s>
|
funcom_train/18948670 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void modify( PropertySet pSourcePropertySet, PropertySet pTargetPropertySet ) throws StandardException {
if( ErrorUtil.not_null( pSourcePropertySet ) && ErrorUtil.not_null( pTargetPropertySet ) ) {
createNameValueList( pSourcePropertySet, pTargetPropertySet );
}
}
COM: <s> modify the supplied property set </s>
|
funcom_train/47509387 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(Expediente entity) {
EntityManagerHelper.log("saving Expediente instance", Level.INFO, null);
try {
getEntityManager().persist(entity);
EntityManagerHelper.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved expediente entity </s>
|
funcom_train/49044653 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addMaxCpuTimePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_EventSet_MaxCpuTime_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_EventSet_MaxCpuTime_feature", "_UI_EventSet_type"),
EventPackage.Literals.EVENT_SET__MAX_CPU_TIME,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the max cpu time feature </s>
|
funcom_train/32776572 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSpace(Space space) {
if (this.space != null || space == null)
return;
this.space = space;
// ask space for existing spatial groups and add them to the group list
// Group[] spatialGroups = this.space.getSpatialGroups();
// for (int i = 0; i < spatialGroups.length; i++) {
// this.groups.put(spatialGroups[i].getName(), spatialGroups[i]);
// }
}
COM: <s> sets the space model for this environment to the given space </s>
|
funcom_train/32613775 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int hashCode () {
int hashCode = getQName().hashCode();
hashCode = 37 * hashCode + (m_sDataType != null ? m_sDataType.hashCode() : 0);
hashCode = 37 * hashCode + (m_sLanguage != null ? m_sLanguage.hashCode() : 0);
return hashCode;
}
COM: <s> calculates hash code for this literal </s>
|
funcom_train/48391019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HandlerRegistration addLeafContextClickHandler(com.smartgwt.client.widgets.tree.events.LeafContextClickHandler handler) {
if(getHandlerCount(com.smartgwt.client.widgets.tree.events.LeafContextClickEvent.getType()) == 0) setupLeafContextClickEvent();
return doAddHandler(handler, com.smartgwt.client.widgets.tree.events.LeafContextClickEvent.getType());
}
COM: <s> add a leaf context click handler </s>
|
funcom_train/9849785 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int fillInStatement(PreparedStatement ps, Object[] values, int[] sqlTypes, int fromIndex) throws SQLException {
for (int i = 0; i < values.length; i++) {
ps.setObject(fromIndex + i, values[i], sqlTypes[i]);
}
return values.length;
}
COM: <s> fills values into the </s>
|
funcom_train/17458246 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stop() throws MPDConnectionException, MPDPlayerException {
try {
mpd.sendMPDCommand(makeCommand(prop.getProperty(MPDPROPSTOP), null));
} catch (MPDResponseException re) {
throw new MPDPlayerException(re.getMessage(), re.getCommand());
}
status = PlayerStatus.STATUS_STOPPED;
firePlayerChangeEvent(PlayerChangeEvent.PLAYER_STOPPED);
}
COM: <s> stops the player </s>
|
funcom_train/243581 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Card deal(Player[] players, Card card) throws BadCardException {
Card result = m_deck.removeCard(card);
if (result != null) {
for (int k = 0; k < players.length; k++) {
players[k].recieveCard(card);
}
} else {
throw new BadCardException("card " + card.toString() + " not found in deck!");
}
return result;
}
COM: <s> deal a specific card to all players </s>
|
funcom_train/10648379 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddRule05() throws Exception {
ss.addRule("em { text-decoration: underline }");
Style emStyle = ss.getStyle("em");
assertEquals(2, emStyle.getAttributeCount());
assertEquals("underline",
emStyle.getAttribute(CSS.Attribute.TEXT_DECORATION)
.toString());
assertEquals("em", emStyle.getAttribute(AttributeSet.NameAttribute));
}
COM: <s> tests that code add rule code stores rule as style </s>
|
funcom_train/19308078 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected FreeStandingFont getHelveticaFont() throws FontException {
final FontServer4a fontServer = getFontServer();
assertNotNull(fontServer);
final RegisteredFont rf = fontServer.getRegisteredFont("Base14-Helvetica");
assertNotNull(rf);
final FreeStandingFont fsf = rf.getFreeStandingFont();
assertNotNull(fsf);
return fsf;
}
COM: <s> returns the base14 helvetica font </s>
|
funcom_train/44773171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void arot(int axis, double theta) {
theta *= (pi / 180);
double ct = Math.cos(theta);
double st = Math.sin(theta);
int a1 = DIM * ((axis+2) % 3);
int a2 = DIM * ((axis+1) % 3);
for(int j = 0; j < DIM; j++) {
double t1 = T[a1+j], t2 = T[a2+j];
T[a1+j] = ct*t1 + st*t2;
T[a2+j] = -st*t1 + ct*t2;
}
}
COM: <s> rotate theta degrees about the a axis </s>
|
funcom_train/15625167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Rec getRec(final int value, @NotNull final Map<Integer, Rec> info) {
final Rec existingRec = info.get(value);
if (existingRec != null) {
return existingRec;
}
final Rec rec = new Rec();
info.put(value, rec);
return rec;
}
COM: <s> returns the record that describes a connection value </s>
|
funcom_train/1434376 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showToastWindow() {
//On teste si on est sur un autre panel
//que celui de la Map Google.
//Si c'est le cas, on affiche une ToastWindow
if(IHMRegistry.getCenterPanel().getActiveTab().getId() != IHMRegistry.getMapPanel().getId()) {
new CustomToastWindow("Carte mise à jour.", true);
}
}
COM: <s> show the map update toast window if necessary </s>
|
funcom_train/9998531 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString(){
int lastIndexOfDot = this.getClass().toString().lastIndexOf(".");
String className = this.getClass().toString().substring(lastIndexOfDot);
return className+" [val="+value+"]";
}
COM: <s> returns the name of the class and the value </s>
|
funcom_train/35096665 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
boolean result = false;
if (obj instanceof InetAddressRange) {
InetAddressRange objCast = (InetAddressRange) obj;
try {
result = (firstAddress.equals(objCast.firstAddress) && (this
.getPrefix() == objCast.getPrefix()));
} catch (Exception e) {
result = false;
}
}
return result;
}
COM: <s> compare two network ranges return true if theyre equal </s>
|
funcom_train/2023166 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mouseClicked(MouseEvent e) {
if (listItems.getSelectedIndex() != -1) {
// double click? -> "OK"
if (e.getSource() == listItems) {
if ( (e.getButton() == MouseEvent.BUTTON1)
&& (e.getClickCount() == 2) ) {
e.consume();
approved = true;
close();
}
}
}
}
COM: <s> invoked when a mouse button has been pressed and released on a component </s>
|
funcom_train/1559456 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int drawSelectedText(Graphics g, int x, int y, int p0, int p1) throws BadLocationException {
unselected = false;
int z = drawUnselectedText(g, x, y, p0, p1);
unselected = true;
return z;
}
COM: <s> draw the selected text </s>
|
funcom_train/10658342 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() {
try {
s.close();
} catch (IOException e) {
if (ServerConnectionManager.transportLog.isLoggable(
RMILog.VERBOSE)) {
// rmi.log.10C=Note: close operation produced exception:
ServerConnectionManager.transportLog.log(RMILog.VERBOSE,
Messages.getString("rmi.log.10C"), e); //$NON-NLS-1$
}
}
}
COM: <s> closes this connection </s>
|
funcom_train/38326982 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compare(Activation left, Activation right) {
if (right != null) {
if (left.getRule().getSalience() == right.getRule().getSalience()) {
// we compare the facts based on how recent it is
return compareRecency(left,right);
} else {
if (left.getRule().getSalience() > right.getRule().getSalience()) {
return 1;
} else {
return -1;
}
}
} else {
return 1;
}
}
COM: <s> the method first compares the salience </s>
|
funcom_train/46824577 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawMouseLine(Graphics g) {
// If game hasn't started yet
if (currentSeat < 0)
return;
int col = this.model.getMouseCol();
int row = this.model.getMouseRow();
int location = this.model.getMouseLocation();
drawLine(g, col, row, location, DotsModel.seatColor[this.currentSeat]);
}
COM: <s> draw mouse line </s>
|
funcom_train/19914158 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JSONWriter array() throws JSONException {
if (this.mode == 'i' || this.mode == 'o' || this.mode == 'a') {
push('a');
this.append("[");
this.comma = false;
return this;
}
throw new JSONException("Misplaced array.");
}
COM: <s> begin appending a new array </s>
|
funcom_train/37077383 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int addAnnotations(java.util.Collection<SeqFeatureI> features) {
int count = 0;
for (SeqFeatureI feature : features) {
if (feature.isAnnot() && !getAnnotations().contains(feature)) {
getAnnotations().add(feature);
count++;
}
}
return count;
}
COM: <s> adds a collection of annotations to the list of annotations </s>
|
funcom_train/26662701 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void sendError( HttpServletResponse response, int errCode, String msg ) {
try {
response.sendError( errCode, msg );
} catch (IOException e) {
log.error("Cant perform sendError( "+errCode+", "+msg+" )! reason:"+e.getMessage(), e );
}
}
COM: <s> send an error response with given response code and message to the client </s>
|
funcom_train/12173479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void appendTextToPreviousElement(Element element) {
Node node = element.getPrevious();
if (node instanceof Text) {
Text text = (Text)node;
text.append(SINGLE_WHITESPACE);
text.append(NON_BREAKING_SPACE);
text.append(NON_BREAKING_SPACE);
text.append(NON_BREAKING_SPACE);
}
}
COM: <s> append the text to the previouse element </s>
|
funcom_train/14246183 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getCreateClassName() {
String name = ((Class)_args.get("className")).getName();
name = name.substring(name.lastIndexOf('.')+2, name.length());
if (name.endsWith("Impl")) {
name = name.substring(0, name.lastIndexOf("Impl"));
}
return name;
}
COM: <s> returns the name of the uml modelelement without impl m or the fullname </s>
|
funcom_train/9685670 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initInheritance(List list) {
BinTypeRef superClass = bin.getTypeRef().getSuperclass();
if ((superClass != null) && (superClass.getBinCIType().isFromCompilationUnit())) {
list.add(new InheritanceSourceClassNode(this, superClass.getBinCIType()));
}
}
COM: <s> initializes the list with the direct sub types of this </s>
|
funcom_train/31248950 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parsePrivmsg(String chan, String msg) {
conn.doPrivmsg(chan, msg);
int index = indexOfTab(chan);
if (index != -1)
updateTab(index, "<" + conn.getUsername() + "> " + msg, Settings
.getOwnColor());
else
updateTab(getSelectedIndex(), "* Message sent to " + chan + ": "
+ msg, Settings.getOwnColor());
}
COM: <s> sends and prints a code privmsg code </s>
|
funcom_train/31702092 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawPolygon(int[] xCoords, int[] yCoords, int iLen) {
final GL gl = getGL();
gl.glBegin(GL.GL_LINE_LOOP);
for (int pos = 0; pos < iLen; pos++) {
gl.glVertex3f(xCoords[pos], -yCoords[pos], 0);
}
gl.glEnd();
}
COM: <s> draws a poly line automatically closed </s>
|
funcom_train/11074828 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean previous() {
position--;
if (!reverse) {
while (--index >= 0) {
child = children.get(index);
if (testChild()) {
return true;
}
}
}
else {
for (; index < children.size(); index++) {
child = children.get(index);
if (testChild()) {
return true;
}
}
}
return false;
}
COM: <s> this is actually never invoked during the normal evaluation </s>
|
funcom_train/32964586 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSubPath(String node) {
initNodes();
StringBuffer sb = new StringBuffer( 100 );
for (int x = 0; x < nodes.length; x++ ) {
if (sb.length()>0) sb.append(":");
sb.append( nodes[x] );
if (node.equals(nodes[x])) return sb.toString();
}
return null;
}
COM: <s> construct a path to a sub node </s>
|
funcom_train/31985959 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mouseDown(MouseEvent e, int x, int y) {
fAnchorPoint = new Point(x,y);
fCreatedFigure = createFigure();
fCreatedFigure.displayBox(fAnchorPoint, fAnchorPoint);
view().add(fCreatedFigure);
}
COM: <s> creates a new figure by cloning the prototype </s>
|
funcom_train/1823753 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getPersistentLayerables() {
ArrayList persistentLayerables = new ArrayList();
for (Iterator i = layerables.iterator(); i.hasNext();) {
Layerable layerable = (Layerable) i.next();
if (layerable instanceof Layer &&
!((Layer) layerable).hasReadableDataSource()) {
continue;
}
persistentLayerables.add(layerable);
}
return persistentLayerables;
}
COM: <s> called by java2 xml </s>
|
funcom_train/1458652 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MidiEvent getKeySignatureMidiEvent(long tick) {
if (this.keySignatureMidiMessage == null) this.keySignatureMidiMessage = generateMidiKeySignatureMessage();
return new MidiEvent(this.keySignatureMidiMessage, tick + MidiNote.MIDI_SEQUENCE_START_SILENCE_TICK_OFFSET);
}
COM: <s> gets a midi key signature event </s>
|
funcom_train/43827587 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addHighPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_CPNInt_high_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_CPNInt_high_feature", "_UI_CPNInt_type"),
CpntypesPackage.Literals.CPN_INT__HIGH,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the high feature </s>
|
funcom_train/7979732 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveCookies() {
try {
saveCookies((String) getAttribute(ATTR_SAVE_COOKIES));
} catch (MBeanException e) {
logger.warning(e.getLocalizedMessage());
} catch (ReflectionException e) {
logger.warning(e.getLocalizedMessage());
} catch (AttributeNotFoundException e) {
logger.warning(e.getLocalizedMessage());
}
}
COM: <s> saves cookies to the file specified in the order file </s>
|
funcom_train/51109835 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String generatePassword() {
char[] str = new char[8];
int len = passwordChars.length();
for (int i = 0; i < 8; i++) {
byte num = (byte) rnd.nextInt(8);
if (num < 0) {
num += 128;
}
int ind = num % len;
str[i] = passwordChars.charAt(ind);
}
return new String(str);
}
COM: <s> generates a random 8 character password </s>
|
funcom_train/50902789 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeRegionResource(RegionResource res) throws IOException {
write("RESOURCE " + res.getID().toString());
newLine();
writeQuotedTag(res.getType().getID().toString(), "type");
if(res.getAmount() > -1) {
write(res.getAmount() + ";number");
newLine();
}
if(res.getSkillLevel() > -1) {
write(res.getSkillLevel() + ";skill");
newLine();
}
}
COM: <s> writes the cr representation of a region resource object to the underlying stream </s>
|
funcom_train/38861843 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getScreenCommand() {
if (screenCommand == null) {//GEN-END:|183-getter|0|183-preInit
// write pre-init user code here
screenCommand = new Command("Say", Command.SCREEN, 0);//GEN-LINE:|183-getter|1|183-postInit
// write post-init user code here
}//GEN-BEGIN:|183-getter|2|
return screenCommand;
}
COM: <s> returns an initialized instance of screen command component </s>
|
funcom_train/10517058 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCreatePropertiesCacheDirect() {
File cachefile = new File(basedir, "cachefile.properties");
PropertiesfileCache cache = new PropertiesfileCache();
cache.setCachefile(cachefile);
cache.put("key", "value");
cache.save();
assertTrue("Cachefile not created.", cachefile.exists());
cache.delete();
assertFalse("Cachefile not deleted.", cachefile.exists());
}
COM: <s> checks whether a cache file is created </s>
|
funcom_train/34849172 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUp() throws ParseException {
String formatString = this.getProperty("format");
if (formatString == null) {
format = new SimpleDateFormat();
} else {
try {
format = new SimpleDateFormat(formatString);
}
catch( RuntimeException e ) {
throw new ParseException( e );
}
}
}
COM: <s> instantiates the simple date format to use for parsing </s>
|
funcom_train/4978403 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getModal(ArrayList<Integer> list) {
if (list.isEmpty()) {
return 0;
}
double sum = 0;
for (int i=0;i<list.size();i++) {
sum += list.get(i).intValue();
}
return (int) (sum/list.size());
}
COM: <s> our implementation of the modal function defined in the article </s>
|
funcom_train/17458339 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void shuffle() throws MPDConnectionException, MPDPlaylistException {
try {
mpd.sendMPDCommand(new MPDCommand(prop.getProperty(MPDPROPSHUFFLE)));
} catch (MPDResponseException re) {
throw new MPDPlaylistException(re.getMessage(), re.getCommand());
} catch (Exception e) {
throw new MPDPlaylistException(e.getMessage());
}
updatePlaylist();
}
COM: <s> shuffles the songs in the playlist </s>
|
funcom_train/9712209 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OutputStream getOutputStream() throws XMLStreamException {
if (os != null) {
// Flush the state of the writer..Many times the
// write defers the writing of tag characters (>)
// until the next write. Flush out this character
if (writer != null) {
this.writeCharacters("");
this.flush();
}
}
return os;
}
COM: <s> if this xmlstream writer is connected to an output stream </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.