__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/34537797 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSelectField(String _alias) {
if (this.select == null) return "";
for (int i=0;i<this.select.size();i++) {
QueryFieldStructure p = this.select.elementAt(i);
if (p.getAlias().equalsIgnoreCase(_alias)) return p.getField();
}
return "";
}
COM: <s> gets field of the select clause by the alias name </s>
|
funcom_train/89836 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GeneratedClass getGeneratedClass(ByteArray savedBytes) throws StandardException {
if (gc != null) return gc;
if (savedBytes != null)
{
ByteArray classBytecode = cb.getClassBytecode();
// note: be sure to set the length since
// the class builder allocates the byte array
// in big chunks
savedBytes.setBytes(classBytecode.getArray());
savedBytes.setLength(classBytecode.getLength());
}
gc = cb.getGeneratedClass();
return gc; // !! yippee !! here it is...
}
COM: <s> take the generated class and turn it into an </s>
|
funcom_train/29697228 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Enumeration getAdvantages() {
for (Enumeration i = options.getGroups(); i.hasMoreElements();) {
IOptionGroup group = (IOptionGroup)i.nextElement();
if ( group.getKey().equalsIgnoreCase(PilotOptions.LVL3_ADVANTAGES) )
return group.getOptions();
}
// no pilot advantages -- return an empty Enumeration
return new java.util.Vector().elements();
}
COM: <s> returns the lvl3 rules pilot advantages this pilot has </s>
|
funcom_train/9436645 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void onClickFavorite() {
if (mMessage != null) {
// Update UI
boolean newFavorite = ! mMessage.mFlagFavorite;
mFavoriteIcon.setImageDrawable(newFavorite ? mFavoriteIconOn : mFavoriteIconOff);
// Update provider
mMessage.mFlagFavorite = newFavorite;
mController.setMessageFavorite(mMessageId, newFavorite);
}
}
COM: <s> toggle favorite status and write back to provider </s>
|
funcom_train/10521811 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processSimpleRestriction(Element simpleRestriction) {
// annotation?, simpleType?, (enumeration | length | maxExclusive | maxInclusive
// | maxLength | minExclusive | minInclusive | minLength | pattern | fractionDigits
// | totalDigits | whiteSpace)*, (attribute | attributeGroup)*, anyAttribute?
// *** noop ***
}
COM: <s> process a restriction element whose parent is simple content </s>
|
funcom_train/31936516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processObjectContribution(IConfigurationElement element) {
String objectClassName = element.getAttribute(ATT_OBJECTCLASS);
if (objectClassName == null) {
logMissingAttribute(element, ATT_OBJECTCLASS);
return;
}
IObjectContributor contributor = new ObjectActionContributor(element);
manager.registerContributor(contributor, objectClassName);
}
COM: <s> creates popup menu contributor from this element </s>
|
funcom_train/38291586 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
// TAKE CARE: do not change this method otherwise Boot might fail
StringBuffer tmp = new StringBuffer();
if (name != null) {
tmp.append(name);
tmp.append(":");
}
if (className != null) {
tmp.append(className);
}
if (args != null) {
tmp.append("(");
for (int i=0; i<args.length; i++) {
tmp.append(args[i]);
if (i<args.length-1) {
tmp.append(",");
//#ALL_INCLUDE_END*/
}
}
tmp.append(")");
}
return tmp.toString();
}
COM: <s> this method is used by boot profile impl and rma in order </s>
|
funcom_train/22719164 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean login(String username, String pw, String user_session){
session = DatabaseConfig.openMetadataSession();
// -- encrypt password --
pw = new Coder().encrypt(pw);
User user = (User) session.createQuery("select a.user from user_account a where a.password = :pw and a.userName = :username").setParameter("username", username).setParameter("pw", pw).uniqueResult();
if(user!=null){
addSession(user, user_session);
return true;
}
session.close();
return false;
}
COM: <s> check username and password in the database to access internal web pages </s>
|
funcom_train/21693290 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void propertyChange(PropertyChangeEvent evt) {
if ("progress" == evt.getPropertyName()) {
int progress = (Integer) evt.getNewValue();
jProgressBar1.setValue(progress);
taskOutput.append(String.format("Completed %d%% of task.\n", task.getProgress()));
}
}
COM: <s> invoked when tasks progress property changes </s>
|
funcom_train/5606914 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long write(ByteBuffer[] bufs) {
long count = 0;
int bufCount;
for (ByteBuffer buf : bufs) {
if (!buf.hasRemaining()) {
continue;
}
if ((bufCount = write(buf)) == 0) {
break;
}
count += bufCount;
}
return count;
}
COM: <s> write the given byte buffers to the io stream </s>
|
funcom_train/37209545 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testParallelJobsWithStream() {
System.out.println("Parallel jobs with streaming");
DispatchStackImpl d = new BasicDispatchStackImpl(new ArrayList<Activity<?>>());
d.addLayer(new DiagnosticLayer());
d.addLayer(new Parallelize());
d.addLayer(new DummyStreamingInvokerLayer());
for (IterationInternalEvent<?> e : generateLotsOfEvents("Process1", 4)) {
d.receiveEvent(e);
}
try {
Thread.sleep(3000);
System.out.println("--------------------------------------------------\n");
} catch (InterruptedException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
COM: <s> test parallel jobs with streaming </s>
|
funcom_train/14354931 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetRole() {
loginAsSysAdmin();
assertTrue(initSecurityServices());
assertEquals("none", checkGetRole(testRole1));
logout();
loginAsApplDev();
assertTrue(initSecurityServices());
assertEquals("none", checkGetRole(testRole1));
logout();
loginAsApplDev();
assertTrue(initSecurityServices());
assertEquals("SecurityException", checkGetRole(testRole2));
logout();
loginAsUser();
assertTrue(initSecurityServices());
assertEquals("SecurityException", checkGetRole(testRole1));
logout();
}
COM: <s> method name test get role class name </s>
|
funcom_train/40504887 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addGateAllowance(Class<? extends Gate> gateClass, int count) {
if (locked) throw new LockedCircuitException();
gateAllowances.put(gateClass, count);
// XXX probably should be property change event
List<Gate> empty = Collections.emptyList();
fireAddEvent(empty);
}
COM: <s> adds a gate allowance for the given gate type or updates the </s>
|
funcom_train/12196229 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testExists() throws Exception {
try {
new EclipseDeviceRepository(null,
transformerMetaFactory, jdomFactory, null);
fail("Illegal Argument Exception should've been thrown");
} catch (IllegalArgumentException e) {
// success
}
try {
new EclipseDeviceRepository(null,
jdomFactory);
fail("Illegal Argument Exception should've been thrown");
} catch (IllegalArgumentException e) {
// success
}
}
COM: <s> test the exists method </s>
|
funcom_train/4689063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIsSwordFishPlatformActive() throws Exception {
goToTargetPlatformPage();
SWTBotTable tableOfTargets = bot.tableWithLabel("");
if (!tableOfTargets.getTableItem(TestConstants.TARGET_PLATFORM_DEFINITION_NAME + TestConstants.PART_OF_ACTIVE_DEFINITION_NAME).isChecked()) {
fail(TestConstants.ERROR_PLATFORM_NOT_ACTIVE);
}
bot.button(TestConstants.BUTTON_OK).click();
}
COM: <s> check is swordfish target platform active </s>
|
funcom_train/10794286 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addConstraints(ValueMapping vm) {
Column[] cols = (vm.getForeignKey() != null)
? vm.getForeignKey().getColumns() : vm.getColumns();
Index idx = findIndex(cols);
if (idx != null)
vm.setValueIndex(idx);
Unique unq = findUnique(cols);
if (unq != null)
vm.setValueUnique(unq);
}
COM: <s> add existing unique constraints and indexes to the given value </s>
|
funcom_train/18599580 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteGroup(String uuid, String authToken) throws GaapServiceFault {
try {
boolean canInvoke = authorizationManager.hasAuthorization(GroupService.class, "deleteGroup", authToken);
if (!canInvoke)
throw new GaapServiceException("Not authorized to delete a group.");
groupService.deleteGroup(uuid);
} catch (GaapServiceException e) {
throw new GaapServiceFault(e.getMessage());
}
}
COM: <s> routes request from axis to the logical service layer group service impl </s>
|
funcom_train/34508022 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void switchToState(String state) {
synchronized(currentState){
ArtifactState st = stateMap.get(state);
if (st!=null){
currentState = st;
/*
if (observed){
Event evStateChanged = new StateEvent(id,st.getName(),currentState.getName());
env.genEvent(id,evStateChanged);
}*/
ICartagoLoggerManager log = env.getLoggerManager();
if (log.isLogging()){
log.logArtifactStateChanged(System.currentTimeMillis(),id,state);
}
} else {
throw new IllegalArgumentException("state");
}
}
}
COM: <s> switches to the specified state </s>
|
funcom_train/11747162 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSelectLikeIgnoreCaseObjects2() throws Exception {
createArtistsDataSet();
SelectQuery query = new SelectQuery(Artist.class);
Expression qual = ExpressionFactory.likeIgnoreCaseExp("artistName", "artist%");
query.setQualifier(qual);
List<?> objects = context.performQuery(query);
assertEquals(20, objects.size());
}
COM: <s> test how like ignore case works when using lowercase parameter </s>
|
funcom_train/36113314 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Integer getBasicRow(final int col) {
Integer row = null;
for (int i = getNumObjectiveFunctions(); i < getHeight(); i++) {
if (getEntry(i, col) != 0.0) {
if (row == null) {
row = i;
} else {
return null;
}
}
}
return row;
}
COM: <s> checks whether the given column is basic </s>
|
funcom_train/3121137 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List keepAccepted(final List listObjs) {
Iterator it = listObjs.iterator();
List listFiltered = new LinkedList();
Object obj;
while (it.hasNext()) {
obj = it.next();
if (isAccepted(obj)) {
listFiltered.add(obj);
}
}
return (listFiltered);
} // of method
COM: <s> by default calls is accepted to see what objects are accepted </s>
|
funcom_train/41824124 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initOutput(StorageOutputStream out, SignalParameters parameters, Pipe inPipe) throws Exception {
version = 3;
out.writeComment("FORMAT 3");
bioera.config.XmlCreator config = new bioera.config.XmlCreator();
bioera.config.Config.exportXMLProperties(parameters.createCopyOfValues(), "SignalParameters", config);
//System.out.println("p2=" + parameters);
out.writeString(config.toString() + "\r\n");
}
COM: <s> storage format constructor comment </s>
|
funcom_train/3562906 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getNameField() {
if (nameField == null) {
nameField = new JTextField();
nameField.setEditable(editable);
nameField.getDocument().addDocumentListener(docListener);
// nameField.setBackground(CorasClient.DISABLED_COLOR);
}
return nameField;
}
COM: <s> this method initializes name field </s>
|
funcom_train/19977638 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void newDoc(boolean withDocTypeDeclaration) {
if (withDocTypeDeclaration) {
myDocument = new Document(rootElement, (DocType) DEFAULT_DOCTYPE.clone());
Log.Debug(this, "Using doctype: " + DEFAULT_DOCTYPE);
} else {
myDocument = new Document(rootElement);
}
}
COM: <s> creates a new xml document with the root element </s>
|
funcom_train/31804790 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final private void sign(PrivateKey key) {
if (key == null) {
// unknown user
System.err.println("Sharedsecret.sign(): null private key");
return;
}
try {
_mdigest.reset();
_mdigest.update(secret());
_sign.initSign(key);
_sign.update(_mdigest.digest());
setSignature(_sign.sign());
} catch (InvalidKeyException excpt) {
System.err.println(excpt.toString());
return;
} catch (SignatureException excpt) {
System.err.println(excpt.toString());
return;
}
}
COM: <s> signs the signature </s>
|
funcom_train/3404804 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuilder sb = new StringBuilder(getMessage());
for( List<Location> locs : pos ) {
sb.append("\n\tthis problem is related to the following location:");
for( Location loc : locs )
sb.append("\n\t\tat ").append(loc.toString());
}
return sb.toString();
}
COM: <s> returns the exception name message and related information </s>
|
funcom_train/1804171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setYouTubeCategory(String name) {
for (Iterator<MediaCategory> iterator = getCategories().iterator(); iterator.hasNext();) {
MediaCategory category = iterator.next();
if (YouTubeNamespace.CATEGORY_SCHEME.equals(category.getScheme())) {
iterator.remove();
}
}
addCategory(new MediaCategory(YouTubeNamespace.CATEGORY_SCHEME, name));
}
COM: <s> sets or changes the previously set you tube category </s>
|
funcom_train/20633712 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ConnectionParams createConnectionParams() {
connectionParams = new ConnectionParams();
connectionParams.setUserName(getProperty(CONNECTED_USER));
connectionParams.setPassword(getProperty(CONNECTED_PASSWORD));
connectionParams.setUrl(getProperty(CONNECTED_SERVER_URL));
connectionParams.setJDBCDriver(getProperty(CONNECTED_DBDRIVER));
return connectionParams;
}
COM: <s> creates connection params from property values of user password and </s>
|
funcom_train/3611877 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadEnvironment(){
Enumeration enum;
Properties addProp;
/*addProp = System.getProperties();
enum = addProp.keys();
while(enum.hasMoreElements()){
theKey = (String) enum.nextElement();
put(theKey, addProp.getProperty(theKey));
}*/
}
COM: <s> loads all the environment variables </s>
|
funcom_train/17805083 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addPatternInfoTargetComponentPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_PatternNode_InfoConnection_patternInfoTargetComponent_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_PatternNode_InfoConnection_patternInfoTargetComponent_feature", "_UI_PatternNode_InfoConnection_type"),
CtbPackage.Literals.PATTERN_NODE_INFO_CONNECTION__PATTERN_INFO_TARGET_COMPONENT,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the pattern info target component feature </s>
|
funcom_train/51788038 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addPreviousElementPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_FlowElement_previousElement_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_FlowElement_previousElement_feature", "_UI_FlowElement_type"),
RAMPackage.Literals.FLOW_ELEMENT__PREVIOUS_ELEMENT,
true,
false,
false,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the previous element feature </s>
|
funcom_train/34062144 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Session getSession() throws HibernateException {
SessionBean sessionBean = (SessionBean) session.get();
// Open a new Session, if this thread has none
if (sessionBean == null) {
session = new ThreadLocal<SessionBean>();
sessionBean = new SessionBean();
sessionBean.setSession(sessionFactory.openSession());
// Store it in the ThreadLocal variable
session.set(sessionBean);
System.out.println(session);
}
return sessionBean.getSession();
}
COM: <s> pobiera sesje hibernateowa </s>
|
funcom_train/48353886 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getFldArrObjName() {
if (strNonLocalTypeName == null) {
if (val instanceof FieldRef) {
FieldRef fld = (FieldRef)val;
strNonLocalTypeName = fld.getField().getSignature();
}
else {
assert val instanceof ArrayRef;
strNonLocalTypeName = ((ArrayRef)val).getType() + "[]";
}
}
return strNonLocalTypeName;
}
COM: <s> gets creates cache string name for field or array elem type or object </s>
|
funcom_train/44137007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void undo() {
if(m_CuttedComponents.size() > 0)
m_EditorPanel.centerOnComponent((OSMElementComponent)m_CuttedComponents.get(0));
m_EditorPanel.setFrameToFront();
OSMApplication.ClipBoard.trash();
m_EditorPanel.undoComponentsSuppression(false);
m_UndoMade = true;
}
COM: <s> to undo the action </s>
|
funcom_train/27794835 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getAdapter(Class aClass) {
Object adapter;
if (aClass.equals(IContentOutlinePage.class)) {
if (fOutlinePage == null || fOutlinePage.isDisposed()) {
fOutlinePage = new AntlrOutlinePage(this);
if (getEditorInput() != null) {
fOutlinePage.setInput(getEditorInput());
}
}
adapter = fOutlinePage;
} else {
adapter = super.getAdapter(aClass);
}
return adapter;
}
COM: <s> the code antlr editor code implementation of this </s>
|
funcom_train/24940949 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SuspendPin getSuspendPin() {
/*
* FIXME: commented out until the halt signal is fully supported. The
* user API should have no mention of suspend until then. if
* (entryMethod == null) { return
* net.sf.openforge.forge.api.pin.SuspendPin.GLOBAL; } else { return
* entryMethod.getSuspendPin(); }
*/
return null;
}
COM: <s> returns the api pin to use for the reset signal </s>
|
funcom_train/46379191 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addAll(InputStream is, List<String> list) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(is));
String line;
while ((line = in.readLine()) != null) {
if (line.trim().length() > 0) {
list.add(line.trim());
}
}
}
COM: <s> add all services in a file to a list </s>
|
funcom_train/7989338 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean validateKnownSource() {
// a Source is valid if we can retrieve it from the database
if (dbManager.getSource(uriSource) == null) {
// Might want to use a generic response message so as to not leak information.
setStatusUnknownSource();
return false;
}
else {
return true;
}
}
COM: <s> returns true if the source name present in the uri is valid i </s>
|
funcom_train/24528078 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onRowChanged(){
if (getWidget()!=null && (m_onRowChangedLocked == false)){
//logDebug("RDBDatasource.onRowChanged firing");
getWidget().fireEvent(this, "onRowChanged");
}
notifyRowChangeListeners("-1", "-1");
}
COM: <s> fired from superclass we hook this to fire widget events </s>
|
funcom_train/15913453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addMatchingEntry(RELibraryEntry entry) {
matches.add(entry);
if (!booksWithMatches.contains(entry.getCategory().getBook())) {
booksWithMatches.add(entry.getCategory().getBook());
}
if (!categoriesWithMatches.contains(entry.getCategory())) {
categoriesWithMatches.add(entry.getCategory());
}
}
COM: <s> add the passed entry to the ones matching this objects query </s>
|
funcom_train/37562817 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getFocusIndex () {
checkWidget ();
return ((CList)handle).getFocusIndex();
// int result = OS.SendMessage (handle, OS.LB_GETCARETINDEX, 0, 0);
// if (result == 0) {
// int count = OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
// if (count == 0) return -1;
// }
// return result;
}
COM: <s> returns the zero relative index of the item which currently </s>
|
funcom_train/47741963 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJbtnAccept() {
if (jbtnAccept == null) {
jbtnAccept = new JButton();
jbtnAccept.setText("Aceptar");
jbtnAccept.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
accept(); // TODO Auto-generated Event stub actionPerformed()
}
});
}
return jbtnAccept;
}
COM: <s> this method initializes jbtn accept </s>
|
funcom_train/8986264 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void destroy() {
logger.info("LoginFilter: shutting down.");
String authMethod = SystemParameterFactory.getSystemParameter(SystemParameterConstant.LOGIN_METHOD);
// only call super.destroy() if the system is using the NTLM authentication method.
if (authMethod.equalsIgnoreCase("NTLM")) {
super.destroy();
}
}
COM: <s> cleanup any system resources etc </s>
|
funcom_train/26391706 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e) {
String a = e.getActionCommand();
if (a.equals("Interpret")) {
interpretSelected();
}
// else if (a.equals("Edit"))
// {
// }
else if (a.equals("Quit")) {
shutdown();
// System.exit(0);
} /* End if*/
}
COM: <s> handle menu actions </s>
|
funcom_train/15401019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void load(ImageViewerModel m, File f) {
setConfigFile(f);
InputStream is;
try {
is = new FileInputStream(f);
load(m, is);
} catch(FileNotFoundException fnfexc) {
_Log.error(fnfexc);
fnfexc.printStackTrace();
}
}
COM: <s> loads action table from provided file and model </s>
|
funcom_train/24357541 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Font untransform(Font font) {
// replace font family
Map /*<TextAttribute, ?>*/ attributes = FontUtilities.getAttributes(font);
// set default font size
attributes.put(TextAttribute.SIZE, new Float(SVGGlyph.FONT_SIZE));
// remove font transformation
attributes.remove(TextAttribute.TRANSFORM);
attributes.remove(TextAttribute.SUPERSCRIPT);
return new Font(attributes);
}
COM: <s> creates a font based on the parameter </s>
|
funcom_train/8629839 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addBatch(String sql) throws SQLException {
try {
debugCodeCall("addBatch", sql);
checkClosed();
sql = conn.translateSQL(sql, escapeProcessing);
if (batchCommands == null) {
batchCommands = ObjectArray.newInstance();
}
batchCommands.add(sql);
} catch (Exception e) {
throw logAndConvert(e);
}
}
COM: <s> adds a statement to the batch </s>
|
funcom_train/1510803 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkForReducibility() {
// The graph is set to be reducible as long as we do not detect any loop
// along forward edges below.
isReducible = true;
// Check for loops along forward edges starting at the entry block.
checkForReducibility(entryBlock, new BitSet(blocks.size()));
}
COM: <s> checks whether this flow graph is reducible or not and sets the </s>
|
funcom_train/16650658 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isValidPredicateNumber(String str) {
int strLength = str.length();
if (strLength == 0) {
return false;
}
for (int i = 0; i < strLength; i++) {
if (!ASCIIUtil.isNumber(str.charAt(i))) {
return false;
}
}
// No leading zeros
if (str.charAt(0) == '0') {
return false;
}
return true;
}
COM: <s> util method for </s>
|
funcom_train/6025620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void redraw(final Writer out) throws IOException {
final JsContentRenderer renderer = new JsContentRenderer();
renderProperties(renderer);
out.write("\nzkb('");
final String wgtcls = getWidgetClass();
if (wgtcls == null)
throw new UiException("Widget class required for "+this+" with the "+getMold()+" mold");
out.write(wgtcls);
out.write("','");
out.write(getUuid());
out.write("','");
final String mold = getMold();
if (!"default".equals(mold))
out.write(mold);
out.write("',{\n");
out.write(renderer.getBuffer().toString());
out.write("});\n");
redrawChildren(out);
out.write("zke();\n");
}
COM: <s> redraws this component and all its decendants </s>
|
funcom_train/44466009 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private AuthorizationContext getNoRoleContext() throws IllegalAuthorizationException {
String userGUID = "";
String productID = "";
String accountID = "";
List<String> subs = new ArrayList<String>();
subs.add("991");
List<String> roles = new ArrayList<String>();
return new DefaultAuthorizationContext(accountID, productID, subs, userGUID, roles);
}
COM: <s> creates an authorization context object for a user with no roles </s>
|
funcom_train/22359220 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GameData createGameData(String aGameName) throws IOException {
Rules rules = new RulesReader().readRules(aGameName);
if (rules == null)
// This should never happen but who knows
throw new IOException("No Rules for game '" + aGameName + "' readable!");
return rules.getGameSpecificStuff().createGameData(aGameName);
}
COM: <s> creates a new game data based on the gamename rules </s>
|
funcom_train/28486191 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GSMessageI getGSMessage(String id) throws WSRuntimeException {
GSMessageI rez = null;
for (GSMessageI msg : headerMessages) {
if (id.equalsIgnoreCase(msg.getId())) {
if (rez != null) {
throw new WSRuntimeException("More than one GSMessage exist for the given code: " + id);
} else {
rez = msg;
}
}
}
return rez;
}
COM: <s> retrieve a gsmessage by its error code id field in xml </s>
|
funcom_train/22349577 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus) {
// This is really only called if we're using ocean.
if (_usingOcean()) {
bounds.x += 2;
bounds.y += 2;
bounds.width -= 3;
bounds.height -= 4;
super.paintCurrentValue(g, bounds, hasFocus);
} else if (g == null || bounds == null) {
throw new NullPointerException(
"Must supply a non-null Graphics and Rectangle");
}
}
COM: <s> if necessary paints the currently selected item </s>
|
funcom_train/25187925 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetMaximum() throws Exception {
System.out.println("getMaximum");
JSchema instance = new JSchema();
assertNull(instance.getMaximum());
instance.setMaximum(1);
assertEquals(1, instance.getMaximum());
instance.setMaximum(-121.2);
assertEquals(-121.2, instance.getMaximum());
}
COM: <s> test of get maximum method of class jschema </s>
|
funcom_train/7542274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Edit createEdit(int offset, int length, String text) throws BadLocationException {
if (!fDocument.containsPositionCategory(fCategory)) {
fDocument.addPositionCategory(fCategory);
fUpdater= new DefaultPositionUpdater(fCategory);
fDocument.addPositionUpdater(fUpdater);
}
Position position= new Position(offset);
try {
fDocument.addPosition(fCategory, position);
} catch (BadPositionCategoryException e) {
Assert.isTrue(false);
}
return new Edit(fDocument, length, text, position);
}
COM: <s> creates a new edition on the document of this factory </s>
|
funcom_train/37797124 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLogFormat(LogFormatAttribute format) {
if ("default".equals(format.getValue())) {
setClassName(DEFAULT_REPORTER_CLASSNAME);
} else if ("canoo".equals(format.getValue())){
setClassName(CANOO_REPORTER_CLASSNAME);
}
}
COM: <s> sets the format of the reporter </s>
|
funcom_train/43097774 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void buildModel() {
String tagName = "deprecated";
setSelected(false);
Object tv = Model.getFacade().getTaggedValue(getTarget(), tagName);
if (tv != null) {
String tag = Model.getFacade().getValueOfTag(tv);
if ("true".equals(tag)) {
setSelected(true);
}
}
}
COM: <s> set the checkbox according to the tagged values of the target </s>
|
funcom_train/12313157 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getLinksWidth(Description text) {
int linkWidth = 0;
IHelpResource relatedTopics[] = context.getRelatedTopics();
if (relatedTopics != null) {
GC gc = new GC(text);
for (int i = 0; i < relatedTopics.length; i++) {
linkWidth = Math.max(linkWidth, gc.textExtent(relatedTopics[i]
.getLabel()).x);
}
gc.dispose();
}
return linkWidth;
}
COM: <s> measures the longest label of related links </s>
|
funcom_train/48371272 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Point getStringBounds(String s) {
int width = 0;
for (int i = 0; i < s.length(); i++) {
char c = s.charAt(i);
int index = alphabet.indexOf(c);
if (index == -1)
index = alphabet.indexOf('?');
if (index != -1) {
width += charWidths[index];
}
}
stringBounds.set(width, fontHeight);
return stringBounds;
}
COM: <s> returns how much area given string occupies </s>
|
funcom_train/31987866 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void open_InterfaceRepository() {
try {
Interface_Repository_Client ir_client = new Interface_Repository_Client ();
String name = System . getProperty (Repository_Manager . service_url_property, Repository_Manager . service_url_default);
ir_client.setup(name, false);}
catch (Exception e) {e. printStackTrace ();}
}
COM: <s> das interface repository wird geoeffnet </s>
|
funcom_train/43245362 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetECTwoZip() {
System.out.println("getECTwoZip");
EmergencyContactDG4Object instance = new EmergencyContactDG4Object();
String expResult = "";
String result = instance.getECTwoZip();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get ectwo zip method of class org </s>
|
funcom_train/24634693 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPageSize(Rectangle pageSize) {
if(!guessFormat(pageSize, false)) {
this.pageWidth = (int) (pageSize.width() * RtfElement.TWIPS_FACTOR);
this.pageHeight = (int) (pageSize.height() * RtfElement.TWIPS_FACTOR);
this.landscape = pageWidth > pageHeight;
}
}
COM: <s> set the page size to use </s>
|
funcom_train/12179203 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Element doStrikeTest(boolean supportsStrike, boolean supportsCSS) {
MutablePropertyValues properties = createPropertyValues();
properties.setComputedAndSpecifiedValue(
StylePropertyDetails.MCS_TEXT_LINE_THROUGH_STYLE,
MCSTextLineThroughStyleKeywords.SOLID);
return doTest(false, false, false, supportsStrike, supportsCSS, "p",
properties);
}
COM: <s> utility method to test strike emulation </s>
|
funcom_train/14422005 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Position cursorPosition() {
return (Position) syncExec(new ObjectResult() {
public Object run() {
getControl().setFocus();
int offset = getControl().getSelectionRange().x;
int lineNumber = getControl().getContent().getLineAtOffset(offset);
int offsetAtLine = getControl().getContent().getOffsetAtLine(lineNumber);
int columnNumber = offset - offsetAtLine;
return new Position(lineNumber, columnNumber);
}
});
}
COM: <s> gets the current position of the cursor </s>
|
funcom_train/3180645 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone() {
EntityRef entity = null;
try {
entity = (EntityRef) super.clone();
} catch (CloneNotSupportedException ce) {
// Can't happen
}
// name is a reference to an immutable (String) object
// and is copied by Object.clone()
// The parent reference is copied by Object.clone(), so
// must set to null
entity.parent = null;
return entity;
}
COM: <s> this will return a clone of this code entity ref code </s>
|
funcom_train/35534502 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void characters(char ch[], int start, int len) throws SAXException {
try {
if (!startTagIsClosed) {
write('>');
startTagIsClosed = true;
}
writeEsc(ch, start, len, false);
super.characters(ch, start, len);
} catch (IOException e) {
throw new SAXException(e);
}
}
COM: <s> write character data </s>
|
funcom_train/31043304 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void handleChangedResources() {
if (!changedResources.isEmpty() && (!isDirty() || handleDirtyConflict())) {
editingDomain.getCommandStack().flush();
for (Iterator i = changedResources.iterator(); i.hasNext(); ) {
Resource resource = (Resource)i.next();
if (resource.isLoaded()) {
resource.unload();
try {
resource.load(Collections.EMPTY_MAP);
}
catch (IOException exception) {
HivespiderEditorPlugin.INSTANCE.log(exception);
}
}
}
}
}
COM: <s> handles what to do with changed resources on activation </s>
|
funcom_train/24242587 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JSON toJSON() {
// get records
JSONList row = new JSONList();
for (Iterator it = resultSetToArrayList.iterator(); it.hasNext();) {
row.add(((ObjectDto) it.next()).toJSON());
}
return Library.toJSON(row);
}
COM: <s> returns a jsonobject compliant with js framework </s>
|
funcom_train/48590033 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private List sortList(List aCollection) {
// sometimes there is a null pointer exception while sorting
try {
Collections.sort(aCollection, Collator.getInstance());
} catch (Exception e) {
logger.warning("exception raised: " + e.getMessage());
e.printStackTrace();
}
return aCollection;
}
COM: <s> sorts a list naturally </s>
|
funcom_train/33256190 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public class Makhaya extends RobotPlayer {
public String getName() { return "Makhaya"; }
public int turn() {
int attempt = dontExpandTurn();
if (attempt == colour) attempt = -1;
if (attempt < 0) attempt = mostTurn();
return attempt;
}
public String getIcon() { return "greenAlien.gif"; }
}
COM: <s> makhaya is an experimental strategy </s>
|
funcom_train/33555627 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void moveMyTankForward(long time) {
float speed = _configuration.getTankSpeed() * time / 1000;
incrementMyTankPosition(speed * (float)Math.sin(_myTank.getAzimuthInRadians()), speed * (float)Math.cos(_myTank.getAzimuthInRadians()));
}
COM: <s> moves own tank forward for a certain period of time </s>
|
funcom_train/40308456 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void clearGraph() {
//removes all vertex and edges from the graph
//getCells(boolean groups, boolean vertexes, boolean ports, boolean edges)
Object[] cells = graph.getGraphLayoutCache().getCells(false, true, false, true);
cells = graph.getDescendants(cells);
graph.getModel().remove(cells);
graph.getGraphLayoutCache().removeCells(cells);
}
COM: <s> perform cleanup removing all inserted vertexes and edges from the graph view </s>
|
funcom_train/10191463 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: /*public int indexOfSubElement(String subelem)
{ for (int i=0; i<m_strList.size(); i++)
{ String elem=(String)m_strList.elementAt(i);
int index=elem.indexOf(subelem);
if (index>=0 && index<elem.length()) return i;
}
return -1;
}*/
COM: <s> whether an element that containg i subelem i </s>
|
funcom_train/9978360 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void globalExceptionMappingItemSelected(Element elt) {
// Fill menu
openEditGlobalExceptionMappingPanel(elt);
MenuItem removeItem = new MenuItem(popupMenu, SWT.PUSH);
removeItem.setText("Remove exception mapping");
removeItem.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
model.deleteGlobalExceptionMapping((Element) tree.getSelection()[0].getData());
tree.getSelection()[0].dispose();
}
});
}
COM: <s> called when global exception mapping item has been selected </s>
|
funcom_train/13516418 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HashMap acts(){
updateSatisVars(); // update bilan_actuel
update_action_range(); // update action range TODO CHANGER
update_seuil_sat(); // update seuil_sat
((CS3)CS).updateParams(); // update reward, oubli
CS.updateRules(); // update rules
HashMap a=CS.select_action(); // choose an action
return a;
}
COM: <s> decision making process </s>
|
funcom_train/49263140 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void load(final SqlObject<?, ?> object, final boolean ifNecessary) {
if (object == null) {
return;
}
if (object instanceof LoadableObject<?, ?>) {
LoadableObject<?, ?> loadable = (LoadableObject<?, ?>) object;
if (((ifNecessary && !loadable.isLoaded()) || !ifNecessary)
&& !loadable.isLoading()) {
loadContent(loadable);
}
}
}
COM: <s> loads an object content used for servers and databases </s>
|
funcom_train/14272951 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void handleTickle(PADP_Packet pkt) {
if(debugMode) System.err.println("[PADP] < Received Tickle Packet...");
if(interPktTimer!=null && interPktTimer.isAlive()) interPktTimer.interrupt();
interPktTimer = new PacketTimer(IP_TIMEOUT, this, debugMode);
interPktTimer.start();
} // end-method
COM: <s> handle a tickle packet received from the remote end </s>
|
funcom_train/35669736 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addBaseCIArcPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_CIArcFragment_baseCIArc_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_CIArcFragment_baseCIArc_feature", "_UI_CIArcFragment_type"),
FragmentsPackage.Literals.CI_ARC_FRAGMENT__BASE_CI_ARC,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the base ci arc feature </s>
|
funcom_train/10344162 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ResourceBundle getApplicationResourceBundle(Locale locale) {
ResourceBundle bundle = null;
//we only cache the meta xmls.
Cache applicationResourceCache = CacheHelper.instance.getCache("ApplicationResources");
try {
bundle = (ResourceBundle) applicationResourceCache.get(locale);
}
catch (NotFoundInCacheException e) {
bundle = loadBundle(locale, "ApplicationResources");
applicationResourceCache.put(locale, bundle);
}
return bundle;
}
COM: <s> get the resource bunder for the server side </s>
|
funcom_train/3168820 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public XnRegion boxProjection(int box, int dimension) {
return (XnRegion) (myRegions.fetch(box * mySpace.axisCount() + dimension));
/*
udanax-top.st:11700:BoxAccumulator methodsFor: 'private:'!
{XnRegion} boxProjection: box {Int32} with: dimension {Int32}
"Change a projection of a box"
^(myRegions fetch: box * mySpace axisCount + dimension) cast: XnRegion!
*/
}
COM: <s> change a projection of a box </s>
|
funcom_train/18729881 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Edge edge(Vertex from, Vertex to) {
Edge edge = new Edge(from, to);
e2s.put(edge, new LinkedList());
v2e.get(from).add(edge);
v2e.get(to).add(edge);
owner.add(edge);
return edge;
}
COM: <s> create new edge </s>
|
funcom_train/8805634 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ASFieldAccess toFieldAccess() {
ASFieldAccess fa = new ASFieldAccess(getAST());
if (isSimpleName()) {
fa.setName((ASSimpleName) clone());
} else {
ASQualifiedName q = (ASQualifiedName) this;
fa.setName((ASSimpleName) q.getName().clone());
if (q.getQualifier() != null) {
fa.setExpression(q.getQualifier().toFieldAccess());
}
}
return fa;
}
COM: <s> converts this name into a field access chain </s>
|
funcom_train/20889674 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void calcBackoffTime(double csStart) {
if (immediateSend) {
setBackoffTime();
} else {
long passedBackoffSlots = (long) Math.floor(
(getNode().getCurrentTime() - csStart)
/ globalTimings.getSlotTime());
backoffTime -= passedBackoffSlots * globalTimings.getSlotTime();
if (backoffTime <= 0.0) {
immediateSend = true;
backoffTime = 0.0;
}
}
}
COM: <s> internal method to modify set the backoff delay </s>
|
funcom_train/27823036 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean pointsToValue(String instanceURI,String propertyURI,String targetInstanceURI,Object targetValue) throws KAONException {
try {
return m_kaonConnection.getEngineeringServer().pointsToValue(m_modelID,instanceURI,propertyURI,targetInstanceURI,targetValue);
}
catch (RemoteException e) {
throw new KAONException("Error in remote call",e);
}
}
COM: <s> checks whether given instance is connected to specified value through a specified property </s>
|
funcom_train/41621689 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateWrap(float time, float speed) {
this.time = this.time + (time * speed);
if(this.time >= this.frameTimes[this.nextFrame]) {
this.nextFrame++;
this.prevFrame = this.nextFrame - 1;
while(this.nextFrame > this.frames.length - 1) {
this.prevFrame = 0;
this.nextFrame = this.prevFrame + 1;
this.complete = true;
this.time = 0.0f;
break;
}
}
}
COM: <s> update frame index when the wrap mode is set to wrap </s>
|
funcom_train/24932395 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Set associations() {
Set res = new HashSet();
Iterator aendIter = fNavigableElements.values().iterator();
while (aendIter.hasNext() ) {
MNavigableElement aend = (MNavigableElement) aendIter.next();
res.add(aend.association());
}
return res;
}
COM: <s> returns the set of associations this class directly </s>
|
funcom_train/31435209 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setBatteryTimer(){
int answer = JOptionPane.showConfirmDialog(null,
"Do you want to reset the CM11A battery timer as well?");
if (answer == JOptionPane.YES_OPTION)
{
sendClockTimeToX10(true);
batteryBar.setValue(500);
}
if (answer == JOptionPane.NO_OPTION)
{
sendClockTimeToX10(false);
}
}
COM: <s> set the battery timer and the battery bar to the </s>
|
funcom_train/7243955 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void releaseSocket() {
// Release this slot.
synchronized(this) {
_socketsConnecting--;
}
// See if any non-blocking requests are queued.
runWaitingRequests();
// If there's room, notify blocking requests.
synchronized(this) {
if(_socketsConnecting < MAX_CONNECTING_SOCKETS) {
notifyAll();
}
}
}
COM: <s> notification that a socket has been released </s>
|
funcom_train/42530426 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected EObject createInitialModel() {
EClass eClass = (EClass)gatcPackage.getEClassifier(initialObjectCreationPage.getInitialObjectName());
EFactory elementFactory;
if (eClass == null) {
eClass = (EClass)AtcPackage.eINSTANCE.getEClassifier(initialObjectCreationPage.getInitialObjectName());
elementFactory = AtcFactory.eINSTANCE;
}
else {
elementFactory = gatcFactory;
}
EObject rootObject = elementFactory.create(eClass);
return rootObject;
}
COM: <s> create a new model </s>
|
funcom_train/2881309 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ConnectorClient findConnectorClient() throws RemoteException, Exception {
// if server is local, then we search for a ConnectorServer
if (server == null) {
return null;
}
if (isServerRemote) { // It is a ConnectorClient
return (ConnectorClient)server;
} else { // It is the MBeanServer itself, and we need the ConnectorClient
return ConnectionFactory.findConnectorClient(server);
}
}
COM: <s> returns the connector client of this component </s>
|
funcom_train/40884608 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Slider (float min, float max, float steps, SliderStyle style, String name) {
super(name);
setStyle(style);
if (min > max) throw new IllegalArgumentException("min must be > max");
if (steps < 0) throw new IllegalArgumentException("unit must be > 0");
this.min = min;
this.max = max;
this.steps = steps;
this.value = min;
}
COM: <s> creates a new slider </s>
|
funcom_train/50160236 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object get(String key) {
String xpath = XPathUtils.decodeXPath(key);
Node node = doc.selectSingleNode(xpath);
String val = "";
if (node == null) {
// prtln("DocMap.get(): couldn't find node for " + xpath);
}
else {
try {
val = node.getText();
} catch (Exception e) {
prtln("DocMap.get(): unable to get Text for " + xpath);
}
}
return val;
}
COM: <s> given an encoded xpath return the value of the referred to node </s>
|
funcom_train/12734901 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCalendar(XCalendar calendar) {
this.setVariable(SERVER_CALENDAR, calendar);
// FIXME: was introduced to fix OPP-642
// defaultCalendar is thread-local, so at least, this should always set the right calendar ;-)
XCalendar.setDefaultCalendar(calendar);
}
COM: <s> sets this sessions server side calendar </s>
|
funcom_train/31651180 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void stopDispatching(Package pk)throws Exception{
Iterator procIter = pk.getProcesses( ).iterator( );
while(procIter.hasNext()){
Process proc = (Process) procIter.next( );
EventDispatcher dispatcher = (EventDispatcher)dispatchers.get(proc);
if(dispatcher==null) continue;
dispatcher.stopDispatching();
}
}
COM: <s> stops event dispatchers for a package </s>
|
funcom_train/4754072 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void populatePoint(final int func, final UnaryNumerical un, final int x) {
point[func][x] = un.value(xMin + xRange * x / (thisResolution));
if (point[func][x] < yMin) {
yMin = point[func][x];
} else if (point[func][x] > yMax) {
yMax = point[func][x];
}
}
COM: <s> inserts a function value into the appropriate point in the array </s>
|
funcom_train/28343549 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private CorrelationMatrix compInternExtrap(PhaseMatrix matRes, PhaseMatrix matState) {
PhaseMatrix matChi; // the extrapolated matrix
if (this.getAccuracyOrder() == ACCUR_ORDER1)
matChi = matState.plus( matRes );
else
matChi = matRes.times(1./3.).plus( matState );
return new CorrelationMatrix(matChi);
}
COM: <s> perform an internal extrapolation to generate an estimate of the </s>
|
funcom_train/37564360 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testWebDB() throws Exception {
String testDir = System.getProperty("test.build.data",".");
File dbDir = new File(testDir, "testDb");
dbDir.delete();
dbDir.mkdir();
DBTester tester = new DBTester(dbDir, 500);
tester.runTest();
tester.cleanup();
dbDir.delete();
}
COM: <s> the main test method invoked by junit </s>
|
funcom_train/21899644 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ResourceInfo getResourceInfo(File iFile) {
String absolutePath = iFile.getAbsolutePath();
ResourceInfo resource = resources.get(absolutePath);
if (resource == null) {
resource = new ResourceInfo(iFile);
resources.put(absolutePath, resource);
}
return resource;
}
COM: <s> get the resource info object for the file to be monitored </s>
|
funcom_train/27746858 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelection (TableTreeItem[] items) {
checkWidget();
TableItem[] tableItems = new TableItem[items.length];
for (int i = 0; i < items.length; i++) {
if (items[i] == null) throw new SWTError(SWT.ERROR_NULL_ARGUMENT);
if (!items[i].getVisible()) expandItem (items[i]);
tableItems[i] = items[i].tableItem;
}
table.setSelection(tableItems);
}
COM: <s> sets the selection </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.