__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/9186394 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String stringValue() {
Object cv = Assert.checkNonNull(constValue());
if (tag == BOOLEAN)
return ((Integer) cv).intValue() == 0 ? "false" : "true";
else if (tag == CHAR)
return String.valueOf((char) ((Integer) cv).intValue());
else
return cv.toString();
}
COM: <s> the constant value of this type converted to string </s>
|
funcom_train/25306992 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Response getGroupResponse() {
Response response = null;
try {
Group group = getStore().getGroupById(getGroupName());
response = new Response(true, group, Group.class, "group");
}
catch (Exception e) {
response = new Response(false, e.getMessage());
e.printStackTrace();
}
return response;
}
COM: <s> get the response bounded to a group </s>
|
funcom_train/34673184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setUp() {
tidyUpTestData();
setupSystemProperties();
setCore(new Core(this));
if (!setup) {
System.out.println("setup");
ConfigurationHandler.reset();
getCore().resetConfiguration();
ConfigurationHandler.reset();
setup=true;
}
}
COM: <s> sets up the fixture run before every test </s>
|
funcom_train/112339 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRepositoryDirectory(File repositoryDirectory) {
if(repositoryDirectory != null && (repositoryDirectory.isDirectory() || repositoryDirectory.mkdirs()) && repositoryDirectory.canRead()) {
try {
this.repositoryDirectory = repositoryDirectory.getCanonicalFile();
clear();
} catch(IOException ioe) {
clear();
this.repositoryDirectory = null;
}
} else {
clear();
this.repositoryDirectory = null;
}
}
COM: <s> sets the directory object where the cache xml files will be dumped </s>
|
funcom_train/825242 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initUserPosition() {
ViewingPlatform vp = su.getViewingPlatform();
TransformGroup steerTG = vp.getViewPlatformTransform();
Transform3D t3d = new Transform3D();
steerTG.getTransform(t3d);
// args are: viewer posn, where looking, up direction
t3d.lookAt(USERPOSN, new Point3d(0, 0, 0), new Vector3d(0, 1, 0));
t3d.invert();
steerTG.setTransform(t3d);
}
COM: <s> initailize the use position </s>
|
funcom_train/41164337 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(CoQuestion entity) {
EntityManagerHelper.log("saving CoQuestion 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 co question entity </s>
|
funcom_train/7959514 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDividerLocation(double proportionalLocation){
if (! isPainted){
hasProportionalLocation = true;
this.proportionalLocation = proportionalLocation;
} else {
if (proportionalLocation < 0 ){ // safety checks to avoid exceptions
proportionalLocation = 0;
} else if (proportionalLocation > 1){
proportionalLocation = 1;
} else {
super.setDividerLocation(proportionalLocation);
}
}
}
COM: <s> overriden for a bug workaround </s>
|
funcom_train/5381915 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setPriority(InternalJob job, int newPriority) {
synchronized (lock) {
int oldPriority = job.getPriority();
if (oldPriority == newPriority)
return;
job.internalSetPriority(newPriority);
//if the job is waiting to run, reshuffle the queue
if (job.getState() == Job.WAITING) {
long oldStart = job.getStartTime();
job.setStartTime(oldStart + (delayFor(newPriority) - delayFor(oldPriority)));
waiting.resort(job);
}
}
}
COM: <s> changes a job priority </s>
|
funcom_train/18592405 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isFiltered(Component c) {
if (c == null)
return false;
if ("sun.plugin.ConsoleWindow".equals(c.getClass().getName()))
return !trackAppletConsole;
return filtered.containsKey(c)
|| ((c instanceof Window) && isFiltered(c.getParent()))
|| (!(c instanceof Window) && isWindowFiltered(c));
}
COM: <s> returns true if the given component will not be considered when </s>
|
funcom_train/29372526 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenu getJMenu_Radar() {
if (jMenu_Radar == null) {
jMenu_Radar = new JMenu();
jMenu_Radar.setText("Radar Mode");
//This is a know fix problem for menus going behind canvas
jMenu_Radar.add(getJRadioButtonMenuItem_USDSR());
jMenu_Radar.add(getJRadioButtonMenuItem_EU());
jMenu_Radar.getPopupMenu().setLightWeightPopupEnabled(false);
}
return jMenu_Radar;
}
COM: <s> this method initializes j menu radar </s>
|
funcom_train/51501982 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void foreachProceed(STLDataType a, STLDataType b, int i) {
STLString tempS = new STLString((String)(((STLList)b).getVlist()).elementAt(i));
symtbl.setValue( a.getName(), tempS, true, 0 );
}
COM: <s> the function is called to check the boolean condition of foreach </s>
|
funcom_train/34908107 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addGlobalniPrioritaPropertyDescriptor(Object object) {
itemPropertyDescriptors
.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_RozhodovaciMechanizmus_globalniPriorita_feature"),
getString("_UI_RozhodovaciMechanizmus_globalniPriorita_description"),
GebzPackage.Literals.ROZHODOVACI_MECHANIZMUS__GLOBALNI_PRIORITA,
true, false, false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
getString("_UI_HodnotyPropertyCategory"), null));
}
COM: <s> this adds a property descriptor for the globalni priorita feature </s>
|
funcom_train/46457983 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getTabIndex(Data data) {
for(int i = 0; i<tabbedPane.getTabCount(); i++) {
DataToolTab tab = (DataToolTab) tabbedPane.getComponentAt(i);
if (tab.isOwnedBy(data)) return i;
}
return -1;
}
COM: <s> returns the index of the tab containing the specified data object </s>
|
funcom_train/7589487 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float r_sum(float [] y, float [] w){
float tmp1 = (float)0.0, tmp2 =(float) 0.0;
for (int i = 0; i < y.length; i++){
tmp1 += y[i]*w[i];
tmp2 += w[i];
}
return correct_to_01(tmp1 / tmp2);
} // r_sum
COM: <s> r sum transformation </s>
|
funcom_train/23677648 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void calculateNote(int nbCaze) {
notes = new ArrayList<FretboardNote>(nbCaze);
Note current = rootNote.getChromaticEnharmonicNote();
notes.add(new FretboardNote(current, null, this.stringNumber, 0));
for (int i = 1; i < nbCaze; i++) {
current = current.next(true);
notes.add(new FretboardNote(current, null, this.stringNumber, i));
}
}
COM: <s> calculate the list of existing notes on the string </s>
|
funcom_train/37020317 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void print() {
Toolkit tk = Toolkit.getDefaultToolkit();
PrintJob pJob = null;
//PrintJob pJob = tk.getPrintJob(frame, "Jmol Print Job", null);
if (pJob != null) {
Graphics pg = pJob.getGraphics();
if (pg != null) {
display.print(pg);
// Flush the print job
pg.dispose();
}
pJob.end();
}
}
COM: <s> added print command so that it can be used by rasmol script handler </s>
|
funcom_train/43267336 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getBottomPanel() {
if (bottomPanel == null) {
bottomPanel = new JPanel();
bottomPanel.setLayout(new BorderLayout());
bottomPanel.add(getScrollPane(), java.awt.BorderLayout.CENTER);
bottomPanel.add(getAllPanel(), BorderLayout.SOUTH);
}
return bottomPanel;
}
COM: <s> this method initializes j panel3 </s>
|
funcom_train/41024292 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJBackwardButton() {
if (jBackwardButton == null) {
jBackwardButton = new JButton();
jBackwardButton.setText("Go Backward");
jBackwardButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
System.out.println("Go Backward");
wheels.goBackward();
}
});
}
return jBackwardButton;
}
COM: <s> this method initializes j backward button </s>
|
funcom_train/47555368 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ConstructorCall_c reconstruct(Expr qualifier, List arguments) {
if (qualifier != this.qualifier || ! CollectionUtil.allEqual(arguments, this.arguments)) {
ConstructorCall_c n = (ConstructorCall_c) copy();
n.qualifier = qualifier;
n.arguments = TypedList.copyAndCheck(arguments, Expr.class, true);
return n;
}
return this;
}
COM: <s> reconstruct the constructor call </s>
|
funcom_train/11364268 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Context dummyContext(Object toReturn) {
Context ctx = Skeleton.newMock(Context.class);
Skeleton.getSkeleton(ctx).setReturnValue(new MethodCall(Context.class, "lookup", String.class), toReturn);
Skeleton.getSkeleton(ctx).setReturnValue(new MethodCall(Context.class, "lookup", Name.class), toReturn);
return ctx;
}
COM: <s> creates a context that always returns the given object </s>
|
funcom_train/29290283 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ArrayList getAllCompetitionLiveForStaff() throws Exception{
SurveySession surveySession = SessionBeanFactory.getSurveySessionRemoteObject();
Integer survey_type_id = 2;
Integer survey_status_id = 2;
Integer group_id = 3;
return surveySession.getAllSurveyLiveWhereGroupId(survey_type_id, survey_status_id, group_id);
}
COM: <s> return all competition live for staff </s>
|
funcom_train/18601146 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element getStatus(Dbms dbms, int id) throws Exception {
String query = "SELECT statusId, userId, changeDate, changeMessage, name FROM StatusValues, MetadataStatus WHERE statusId=id AND metadataId=? ORDER BY changeDate DESC";
return dbms.select(query, id);
}
COM: <s> return all status records for the metadata id current status is the </s>
|
funcom_train/23998668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setAttributeDescription( Vec2dInt pos, Vec2dInt size, String text ) {
descriptionTimer = MAX_DESC_DISPLAY_TIME;
attributeDesc.setText( text );
attributeDesc.setEnableBackground( true );
attributeDesc.setEnableBorder( true );
attributeDesc.setPosition( pos );
attributeDesc.setSize( size );
}
COM: <s> set the attribute description </s>
|
funcom_train/11103106 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getExceptionHandler() {
FacesContext context = FacesContext.getCurrentInstance();
Object result = context.getApplication().getVariableResolver().
resolveVariable(context, Constants.EXCEPTION_HANDLER);
if (result == null) {
return null;
} else {
return result.getClass().getName();
}
}
COM: <s> p return the class name of the attribute configured under name </s>
|
funcom_train/9805727 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BasicGraph getSubGraph(Collection eciColls) {
// Create copy of this Connectivity object to prune
EdifCellInstanceCollectionGraph ecigc = (EdifCellInstanceCollectionGraph) super.getSubGraph(eciColls);
// Prune all references to unwanted Nodes and Edges from Groupings
// (This is a new groupings object and will not modify the original)
ecigc._groupings.retainGroups(eciColls);
return ecigc;
}
COM: <s> creates an edif cell instance collection graph object that contains only the </s>
|
funcom_train/18787906 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TagDefinition findType(String name) {
assert (name != null) && (name.length() > 0);
for (List<TagDefinition> types : tagDefinitions.values()) {
for (TagDefinition type : types) {
if (type.getTag().equals(name)) {
return type;
}
}
}
return null;
}
COM: <s> finds the first tagged value type with the given name </s>
|
funcom_train/18868624 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BigDecimal getTreeBalance() {
Lock l = transactionLock.readLock();
l.lock();
Lock cLock = childLock.readLock();
cLock.lock();
try {
BigDecimal balance = getBalance();
for (Account child : children) {
balance = balance.add(child.getTreeBalance(getCurrencyNode()));
}
return balance;
} finally {
l.unlock();
cLock.unlock();
}
}
COM: <s> returns the balance of the account plus any child accounts </s>
|
funcom_train/42796644 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addLineJoin(int joinstyle) {
PDFChangeStrokeCmd sc = new PDFChangeStrokeCmd();
Join join = Paint.Join.MITER;
switch (joinstyle) {
case 0:
join = Paint.Join.MITER;
break;
case 1:
join = Paint.Join.ROUND;
break;
case 2:
join = Paint.Join.BEVEL;
break;
}
sc.setLineJoin(join);
addCommand(sc);
}
COM: <s> set the line join style </s>
|
funcom_train/17386673 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void pluginException(PluginException e) {
Enumeration<ErrorPlugin> enumeration = errorPlugins.elements();
while (enumeration.hasMoreElements()) {
ErrorPlugin plugin = (ErrorPlugin) enumeration.nextElement();
((ErrorCallback) plugin.getCallback()).pluginException(e, plugin.getData());
}
}
COM: <s> if an exception is throw from a plugin besides an ioexception which </s>
|
funcom_train/7276160 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateQueryStatus(QueryStatusResponse stat) {
if (isShieldedLeaf()) {
// this should be fast since leaves don't maintain a lot of
// connections and the test for query status response is a cached
// value
for(RoutedConnection currMC : getInitializedConnections()) {
if (currMC.getConnectionCapabilities().remoteHostSupportsLeafGuidance() >= 0)
currMC.send(stat);
}
}
}
COM: <s> sends a query status response message to as many ultrapeers as possible </s>
|
funcom_train/15956849 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void scroll(int row) {
int rows = data.getRows();
if (rows < 1) {
return; // Showing entire table already
}
if (row < 0) {
data.setFirst(0);
} else if (row >= count()) {
data.setFirst(count() - 1);
} else {
data.setFirst(row - (row % rows));
}
}
COM: <s> p scroll to the page that contains the specified row number </s>
|
funcom_train/19370230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initModel(){
myFormat = new RDFXMLOntologyFormat(); //TODO should we be able to set format for OBO, etc?
//myFormat.addPrefixNamespaceMapping(OWVocabulary.owProjectNSabbrev, OWVocabulary.owProjectPrefix);
//myFormat.addPrefixNamespaceMapping(OWVocabulary.owResourceAbbrev, OWVocabulary.owResourcePrefix);
}
COM: <s> performs model initialization common to all constructors </s>
|
funcom_train/12646492 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addNotify() {
synchronized (getTreeLock()) {
if (peer == null) {
peer = ((PeerBasedToolkit) Toolkit.getDefaultToolkit()).createPopupMenu(this);
}
int nitems = getItemCount();
for (int i = 0; i < nitems; i++) {
MenuItem mi = getItem(i);
mi.parent = this;
mi.addNotify();
}
}
}
COM: <s> creates the popup menus peer </s>
|
funcom_train/42047000 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OrderAddressDO find(int orderNr, int sequence, Lock lockType) throws RimuDBException {
KeyList keylist = new KeyList();
keylist.add(OrderAddressDO.F_ORDER_NR, new Integer(orderNr));
keylist.add(OrderAddressDO.F_SEQUENCE, new Integer(sequence));
return (OrderAddressDO) find(keylist, lockType);
}
COM: <s> return a order address do for the given primary key value s </s>
|
funcom_train/10835738 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getName(ServiceReference reference) {
String name = (String) reference.getProperty(SlingServerRepository.REPOSITORY_REGISTRATION_NAME);
if (name == null || name.length() == 0) {
this.log.log(LogService.LOG_DEBUG,
"registerRepository: Repository not to be registered");
return null;
}
return name;
}
COM: <s> returns the code name code property from the service properties or </s>
|
funcom_train/45692211 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSampleRatePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Sample_sampleRate_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Sample_sampleRate_feature", "_UI_Sample_type"),
EsxPackage.Literals.SAMPLE__SAMPLE_RATE,
false,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the sample rate feature </s>
|
funcom_train/2291177 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String nonControl(String s, int start) {
m_cPos = s.indexOf("%", start);
if (m_cPos == -1) {
m_cPos = s.length();
}
return s.substring(start, m_cPos);
}
COM: <s> return a substring starting at </s>
|
funcom_train/863867 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getPopCount() {
int count = operation.popCount;
//check the arguments for implication of extra values
ArgType[] argTypes = operation.argTypes;
for( int i = 0; i < argTypes.length; i++ ) {
count += argTypes[i].extraStackPops( arguments[i] );
}
return count;
}
COM: <s> get the number of stack slots popped by this instruction </s>
|
funcom_train/3154057 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetSceneHeight() {
Product prod;
prod = new Product("TestName", _prodType, _sceneWidth, 373);
assertEquals(373, prod.getSceneRasterHeight());
prod = new Product("TestName", _prodType, _sceneWidth, 427, null);
assertEquals(427, prod.getSceneRasterHeight());
}
COM: <s> tests the functionality of get band output raster height </s>
|
funcom_train/5244672 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean dropGoal(Event te, Unifier un) {
IntentionRow ir = getIR(te, un);
if (ir != null) {
// remove the IRs until ir-1
while (peek() != ir) {
pop();
}
pop(); // remove im
intentionRows.trimToSize();
return true;
}
return false;
}
COM: <s> remove all intention rows up to and including the first that </s>
|
funcom_train/15470081 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Element removeResponseElement() {
Element responseElement = null;
XPath xpath;
try {
xpath = XPath.newInstance("//Response");
List results = xpath.selectNodes(this.commandWrapper);
if (results.size() > 0) {
responseElement = (Element) results.iterator().next();
this.commandWrapper.getRootElement().removeContent(
responseElement);
}
} catch (JDOMException e) {
e.printStackTrace();
}
return responseElement;
}
COM: <s> removes the response element </s>
|
funcom_train/252015 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeColumnSizes() throws IOException {
this.out.write(this.rsn);
this.out.write(".md.setSizes(new Array(");
for(int i=0; i<colsizes.size(); i++) {
int size = ((Integer)this.colsizes.get(i)).intValue();
this.out.write("\""+StringEscapeUtils.escapeJavaScript(String.valueOf(size))+"\"");
this.out.write((i<colsizes.size()-1)?",":"");
}
this.out.write("));\n");
}
COM: <s> write the sizes of the columns metadata to the jsquery client </s>
|
funcom_train/29320922 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setConnection(int componentStart, int outputIndex, int componentEnd, int inputIndex){
Outputable toSet = (Outputable)(componentList.get(componentStart));
toSet.setOutput(outputIndex, (Inputable)(componentList.get(componentEnd)), inputIndex);
updateView();
return true;
}
COM: <s> link up a component </s>
|
funcom_train/4009006 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean login(String login,String password) {
AccountBean bean = (AccountBean)executeSingleQuery(entityManager,
"get-login",login) ;
// account not found
if (bean == null)
return false ;
// wrong password
String beanPassword = bean.getPassword() ;
if (!beanPassword.equals(password))
return false ;
// success
this.account = bean ;
return true ;
}
COM: <s> open the session </s>
|
funcom_train/3920071 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean moveRestrictionDown(RestrictionType restriction) {
if(restriction != null) {
int index = _restrictions.indexOf(restriction);
if(index < _restrictions.size() - 1) {
_restrictions.remove(restriction);
_restrictions.add(index + 1, restriction);
return true;
}
}
return false;
}
COM: <s> move the restriction type down one place in the list </s>
|
funcom_train/39998644 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Iterator getImageTypes(int imageIndex) {
java.util.List l = new java.util.ArrayList();
;
int bits = 8;
/*
* can convert ch5 format into 8 bit grayscale image with no alpha
*/
l.add(ImageTypeSpecifier.createGrayscale(bits, DataBuffer.TYPE_BYTE,
false));
return l.iterator();
}
COM: <s> this method provides suggestions for possible image types that will be </s>
|
funcom_train/43502748 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void refreshNewLinks() {
// Add any additions
// NOTE: the additions are already in the link states
// hash map
if (!additions.isEmpty()) {
for (Elog alog : additions) {
elogs.add(alog);
String title = alog.getReposTitle();
ElogUser user = CIAHelper.toUser(title);
owners2.put(alog,user);
}
}
}
COM: <s> refresh the new links </s>
|
funcom_train/28283785 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected IType getMainType(ICompilationUnit compilationUnit) {
if (compilationUnit == null)
return null;
String name= compilationUnit.getElementName();
int index= name.indexOf('.');
if (index != -1)
name= name.substring(0, index);
IType type= compilationUnit.getType(name);
return type.exists() ? type : null;
}
COM: <s> returns the primary type of a compilation unit has the same </s>
|
funcom_train/35051171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton_modify() {
if (jButton_modify == null) {
jButton_modify = new JButton();
jButton_modify.setText("Save");
jButton_modify.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
SaveAction();
}
});
}
return jButton_modify;
}
COM: <s> this method initializes j button modify </s>
|
funcom_train/31477952 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void sendBackgroundMusic() throws IOException {
String[] musicId = { "music1.wav", "d1.mid", "d2.mid", "d3.mid", "d4.mid", "d5.mid" };
out.writeUTF(musicId[(new java.util.Random()).nextInt(musicId.length)]);
sendOk();
}
COM: <s> sends proper background music </s>
|
funcom_train/45692350 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addPositionNumberPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_SongEvent_positionNumber_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_SongEvent_positionNumber_feature", "_UI_SongEvent_type"),
EsxPackage.Literals.SONG_EVENT__POSITION_NUMBER,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the position number feature </s>
|
funcom_train/43245990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetDateOfDeath() {
System.out.println("setDateOfDeath");
Calendar dateOfDeath = null;
PatientDataObject instance = new PatientDataObject();
instance.setDateOfDeath(dateOfDeath);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set date of death method of class org </s>
|
funcom_train/2950070 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(Decorator d) {
if (decorators == null) return;
int idx = indexOf(d);
if (idx == -1) return;
Decorator[] res = new Decorator[decorators.length - 1];
System.arraycopy(decorators, 0, res, 0, idx);
System.arraycopy(decorators, idx+1, res, idx, res.length - idx);
decorators = res;
}
COM: <s> removes the parameter decorator from the renderer </s>
|
funcom_train/50118066 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String query_alias_str() {
StringBuffer _alias = new StringBuffer();
for(int i = 0; i < aliases.size(); i++) _alias.append((String) aliases.get(i)).append(",");
return _alias.toString();
}
COM: <s> this method returns all the aliases </s>
|
funcom_train/20803728 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void indexBuilderTestFixture (final String[] dictionary, int[] intExpectedIndex, int[] intIndex) {
Comparator<Integer> comparator = createIntegerComparator (dictionary);
IntegerIndexBuilder builder = new IntegerIndexBuilder(comparator);
builder.add (intIndex);
int[] intSortedIndex = exactArrayFromIntBuffer (builder.getSortedIndex());
assertEqualsIntArray (intExpectedIndex, intSortedIndex);
}
COM: <s> test fixture for testing standard integer indexed string dictionaries </s>
|
funcom_train/5078042 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected IFigure createToolTip() {
String message = getToolTipText();
if (message == null || message.length() == 0)
return null;
FlowPage fp = new FlowPage() {
public Dimension getPreferredSize(int w, int h) {
Dimension d = super.getPreferredSize(-1, -1);
if (d.width > 150)
d = super.getPreferredSize(150, -1);
return d;
}
};
fp.setOpaque(true);
fp.setBorder(TOOLTIP_BORDER);
TextFlow tf = new TextFlow();
tf.setText(message);
fp.add(tf);
return fp;
}
COM: <s> create the tool tip for this palette edit part </s>
|
funcom_train/5508779 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ElementFragment getPlainFragment(org.w3c.dom.Node node) {
String id = node.getNodeName();
if (PlainElementFragments.containsKey(id)) {
return (ElementFragment) PlainElementFragments.get(id);
} else {
ElementFragment newFragment = new PlainElementFragmentImpl(node,
domDocument);
PlainElementFragments.put(id, newFragment);
return newFragment;
}
}
COM: <s> gets the plain fragment attribute of the element fragment factory object </s>
|
funcom_train/38380370 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateImportanceForContext(String contextName) {
if (contextName.equals(""))
return;
Vector qualityCriterias = wizard.getMgmtData().getQualityCriterias();
// calculate rating
for (int i = 0; i < qualityCriterias.size(); i++) {
String qualityCriteriaName = (String)qualityCriterias.get(i);
int relevance = wizard.getMgmtData().getQualityCriteria2Context(qualityCriteriaName, contextName);
jTableImportance.setValueAt(new Integer(relevance).toString(),i,1);
}
tableChanged = true;
}
COM: <s> set the quality criterias for the default value for the given context </s>
|
funcom_train/42035988 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void remove(int index) {
assert index < mCount;
// ugh
if (index < mCount) {
for (int x = index; x < mCount; x++) {
if (x + 1 < mContents.length && x + 1 < mCount) {
mContents[x] = mContents[x + 1];
} else {
mContents[x] = null;
}
}
mCount--;
}
}
COM: <s> removes the specified index from the array </s>
|
funcom_train/10238982 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUnderline(boolean on) throws IOException {
byte[] FF = { 0x0c };
byte[] pcodeOn = { 0x1b, 0x2d, 1 };
byte[] pcodeOff = { 0x1b, 0x2d, 0 };
if(on) {
print(pcodeOn);
} else {
print(pcodeOff);
}
//print(FF,schnittstelle);
}
COM: <s> esc turn on off underline </s>
|
funcom_train/22799707 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void create(SchemaSetupParams params) throws SQLException, IOException {
Connection conn = createConnection(params, "");
Statement stmt = conn.createStatement();
// Create database
createDatabase(stmt, params);
conn = createConnection(params, params.getDatabase());
stmt = conn.createStatement();
// Create tables
createTables(stmt);
// Creating views and stored procedures
createViewsProcedures(stmt);
stmt.close();
closeConnection(conn);
}
COM: <s> creates database schema </s>
|
funcom_train/13096611 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createTabMenu() {
this.tabMenu = new Menu();
this.tabMenu.setShadow(true);
this.allTabItem = new MenuItem("Close All Tab");
this.allTabItem.setEnabled(false);
this.tabMenu.add(this.allTabItem);
this.tabMenuItem = new Button("Tab");
this.tabMenuItem.setMenu(this.tabMenu);
toolBar.add(this.tabMenuItem);
}
COM: <s> this method create help menu </s>
|
funcom_train/39062089 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addIdPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(new ItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_IMarkingExtensionNode_id_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_IMarkingExtensionNode_id_feature", "_UI_IMarkingExtensionNode_type"),
MarkingPackage.eINSTANCE.getIMarkingExtensionNode_Id(),
true,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
}
COM: <s> this adds a property descriptor for the id feature </s>
|
funcom_train/20322255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getTfNome() {
if (tfNome == null) {//GEN-END:|81-getter|0|81-preInit
// write pre-init user code here
tfNome = new TextField("Nome", null, 32, TextField.ANY);//GEN-LINE:|81-getter|1|81-postInit
// write post-init user code here
}//GEN-BEGIN:|81-getter|2|
return tfNome;
}
COM: <s> returns an initiliazed instance of tf nome component </s>
|
funcom_train/31128875 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setDatatype(int datatype) {
// validate datatypes
switch (datatype) {
case DT_BOOLEAN :
case DT_BYTE :
case DT_SHORT :
case DT_INTEGER :
case DT_FLOAT :
this.byteCount=4;
break;
case DT_LONG :
case DT_DOUBLE :
this.byteCount=8;
break;
default:
throw new IllegalArgumentException("Invalid datatype " + datatype);
}
this.datatype = datatype;
}
COM: <s> set the datatype for this column series </s>
|
funcom_train/36753889 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void leftMultiply(Matrix4 t, Matrix4 result) {
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
tempM[i][j] = 0;
for (int k = 0; k < 4; k++) {
tempM[i][j] += t.m[i][k] * m[k][j];
}
}
}
result.set(tempM);
}
COM: <s> concatenates t onto this matrix and places the result in the second </s>
|
funcom_train/18126199 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void extend(String indexValue, List<Evaluatable> evals) {
Node node = children.get(NULLSTRING);
if (node == null) {
node = new Node(".*", 0, new ArrayList<Evaluatable>());
children.put(String.valueOf(node.getCharacter()), node);
}
extend(indexValue, -1, evals);
}
COM: <s> extends the node by the given value </s>
|
funcom_train/22106714 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Integer getResourceTypeId() {
if (_typeAndResourceTypeId.equals("-1"))
return new Integer("-1");
List typeList = StringUtil.explode(_typeAndResourceTypeId, ":");
return new Integer((String)typeList.get(1));
}
COM: <s> returns resource type id in entity type id resource type id </s>
|
funcom_train/24187993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString(String[] vars) {
String str = "[";
int i = 0;
for(; i < assignment.length - 1; i++)
str += vars[i] + " = " + assignment[i] + ", ";
str += vars[i] + " = " + assignment[i] + "]";
str += " = " + utility;
return str;
}
COM: <s> prints the information in the assignment </s>
|
funcom_train/42951119 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BitSet InvInitPerm(BitSet C) {
C = Util.copyBitSet(C, 64);
BitSet C_final = new BitSet(64);
for (int i = 0; i < 64; i++) {
C_final.set(i, C.get(IP_inv[i] - 1));
}
return C_final;
}
COM: <s> compute inverse initial permutation ip 1 </s>
|
funcom_train/7656006 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer sb = new StringBuffer(super.toString());
sb.append("\n Certification Path: "); //$NON-NLS-1$
sb.append(certPath.toString());
sb.append("\n]"); //$NON-NLS-1$
return sb.toString();
}
COM: <s> returns a string representation of this </s>
|
funcom_train/50330531 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSpeed(int mode, int address, int spd, boolean isForward) {
SprogSlot s = this.findAddressSpeedPacket(address);
if (s != null) { // May need an error here - if all slots are full!
s.setSpeed(mode, address, spd, isForward);
notifySlotListeners(s);
log.debug("Registering new speed");
sendNow.add(s);
}
}
COM: <s> handle speed changes from throttle </s>
|
funcom_train/28355273 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected double valueForTick(int tick) {
double power = lowerPower + Math.floor(tick / 3);
double value = Math.pow(10, power);
int segment = tick % 3;
switch(segment) {
case 0:
break;
case 1:
value *= 2;
break;
case 2:
value *= 5;
break;
}
return value;
}
COM: <s> get the value corresponding to the tick </s>
|
funcom_train/50297273 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isSearchable(int column) throws SQLException {
if (((getXsqlvar(column).sqltype & ~1) == ISCConstants.SQL_ARRAY)
|| ((getXsqlvar(column).sqltype & ~1) == ISCConstants.SQL_BLOB)) {
return false;
}
else {
return true;
}
}
COM: <s> indicates whether the designated column can be used in a where clause </s>
|
funcom_train/33268905 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(PrettyPrintBox box) {
if (box instanceof VerticalBox) {
VerticalBox vbox = (VerticalBox) box;
for (int i = 0; i < vbox.boxes.size(); i++) {
add((PrettyPrintBox) vbox.boxes.elementAt(i));
}
} else {
boxes.addElement(box);
}
}
COM: <s> adds a box to the vertical box </s>
|
funcom_train/21970987 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void consume( Message message ) throws Exception {
Message response = new DefaultMessage();
response.setMessageContent( "Server got the message :[ " + message.getSenderId() + " ] " + message.getMessageContent() + "\r\n" );
response.setSenderId( message.getSenderId() );
response.setType( message.getType() );
MessageBuffer.getInstance().notifyAll( response );
}
COM: <s> consume the message received </s>
|
funcom_train/32372095 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initCommanderInput() {
if(playerKeyInput != null) input.removeFromAttachedHandlers(playerKeyInput);
if(playerMouseInput != null) input.removeFromAttachedHandlers(playerMouseInput);
rootNode.clearControllers();
mouse.registerWithInputHandler(null);
playerKeyInput = new CommanderKeyInput(cam);
input.addToAttachedHandlers(playerKeyInput);
playerMouseInput = new CommanderMouseInput(cam);
input.addToAttachedHandlers(playerMouseInput);
}
COM: <s> initializes the input for a commanding </s>
|
funcom_train/28993699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void validateNavUrl(String thisPage) {
if (((thisPage != null) &&
thisPage.equalsIgnoreCase("EventInfoAssignNavUrl")) &&
((getNavigationURL() == null) ||
(getNavigationURL().length() == 0))) {
setMessage(
"Please supply a page URL for post-registration user redirection.");
}
}
COM: <s> if current page is event info assign nav url and the navigation url </s>
|
funcom_train/625168 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void outARelationalExpression(ARelationalExpression node) {
Instance value = null;
Node primExpr = node.getCompareableExpression();
AEquation eq = (AEquation) node.getEquation();
if (eq != null) {
Node op = eq.getEquationOperator();
value = invokeOperator(primExpr, op, eq.getCompareableExpression());
} else {
value = annotatedValue(primExpr);
}
annotate(node, value);
}
COM: <s> evaluates and annotates the value s of a relational expression </s>
|
funcom_train/10284945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TagContent getArtist() throws FrameDamagedException {
TagContent ret = TextFrameEncoding.read(id3v2, "TPE1");
if (ret.getTextContent() == null) {
try {
ret.setContent(id3.getArtist());
} catch (NoID3TagException e) {
}
}
return ret;
}
COM: <s> read artist store as text content </s>
|
funcom_train/37805513 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getExportButton() {
if( exportButton == null ) {
exportButton = new JButton();
exportButton.setText("IdentitiesBrowser.button.export");
exportButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(final java.awt.event.ActionEvent e) {
final List<Identity> allIdentities = Core.getIdentities().getIdentities();
exportIdentities(allIdentities);
}
});
}
return exportButton;
}
COM: <s> this method initializes export button </s>
|
funcom_train/36679667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadUnitSprite(Unit unit) {
Color unitColor = unit.getOwner().getColor();
UnitSprite sprite = createUnitSprite(unit);
sprite.setUpdateAnim(false);
recolorUnitSprite(sprite, unitColor, unit);
addUnitSprite(unit, sprite);
sprite.addPropertyChangeListener(this);
unit.addPropertyChangeListener(this);
}
COM: <s> make a graphical representation unit sprite for the unit </s>
|
funcom_train/3794930 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInicio(saci.Fecha inicio) throws java.beans.PropertyVetoException {
saci.Fecha oldInicio = this.inicio;
vetoableChangeSupport.fireVetoableChange("inicio", oldInicio, inicio);
this.inicio = inicio;
propertyChangeSupport.firePropertyChange ("inicio", oldInicio, inicio);
}
COM: <s> setter for property inicio </s>
|
funcom_train/21179417 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPage(String url, String startAddress) {
/*
* tabbed.getContent().addNotationEventListener ( new
* LocationChangeListener (url, PAGE_LOCATION, startAddress, 0, "Browser
* setPage") );
*/
tabbed.setPage(url + "#" + startAddress);
} // method setPage
COM: <s> causes the browser to load a particular page and then scroll to a </s>
|
funcom_train/4179049 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void done(final TestHandler handler) {
Validate.notNull(handler, "The test handler cannot be null.");
int failures = handler.getFailures();
Validate.isTrue(failures >= 0, "The total tests must be greater than 0.");
if (failures > 0) {
fail();
}
succeed(new Operation<ReportEntry>(handler, handler.getName()),
ReportStatus.DONE);
}
COM: <s> finalizes the reporting </s>
|
funcom_train/35998343 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void newLogFileLine(String line, int lineNumber) {
try {
/* TODO - przesylanie nr linii - new Object [] {line, lineNumber} */
if ((Boolean) this.hasLogLineErrorMethod.invoke(null, line)) {
this.errorLines.add(line);
}
} catch (Exception e) {
System.out.println("Error while invoking hasLogLineErrorMethod()");
e.printStackTrace();
}
}
COM: <s> a new line has been added to the tailed log file </s>
|
funcom_train/3374787 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String s = "";
Enumeration names = getAttributeNames();
while (names.hasMoreElements()) {
Object key = names.nextElement();
Object value = getAttribute(key);
if (value instanceof AttributeSet) {
// don't go recursive
s = s + key + "=**AttributeSet** ";
} else {
s = s + key + "=" + value + " ";
}
}
return s;
}
COM: <s> converts the attribute set to a string </s>
|
funcom_train/50610336 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DrawAreaClient exitClientMode(){
if (DEBUG) System.err.println("--DrawArea exiting client mode...");
if (client==null)
throw new DrawAreaException("there is no client registered");
DrawAreaClient _client = client;
clientMode = false;
client = null;
//if the stack is not empty activate the next client...
if (!clientStack.empty()) {
client = (DrawAreaClient)clientStack.pop();
clientMode = true;
}
repaint();
return _client;
}
COM: <s> exists a client mode </s>
|
funcom_train/826761 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void openReport(File file) {
assert file != null;
if (Desktop.isDesktopSupported()) {
Desktop desktop = Desktop.getDesktop();
try {
desktop.open(file);
} catch (Exception e) {
e.printStackTrace();
timeSlotTracker.errorLog("Error during opening document: " + e);
timeSlotTracker.errorLog(e);
}
}
}
COM: <s> opens created document </s>
|
funcom_train/18788027 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MdrTaggedValue createTag(MdrUmlElement item, String tagName) {
MdrTaggedValue taggedValue = findTag(item, tagName);
if (taggedValue == null) {
taggedValue = new MdrTaggedValue(MdrFactory.createTaggedValue(targetModel
.getUmlPackage(), tagName));
item.addTaggedValue(taggedValue);
}
return taggedValue;
}
COM: <s> creates a tag with the given name in the item </s>
|
funcom_train/10384213 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireSessionEvent(String type, Object data) {
if (listeners.size() < 1)
return;
SessionEvent event = new SessionEvent(this, type, data);
SessionListener list[] = new SessionListener[0];
synchronized (listeners) {
list = listeners.toArray(list);
}
for (int i = 0; i < list.length; i++){
(list[i]).sessionEvent(event);
}
}
COM: <s> notify all session event listeners that a particular event has </s>
|
funcom_train/16706684 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int hasLabels(int kind) {
if (kind >= labels.length || kind < -2) {
return -1;
}
if (kind < 0) {
// we have docs and terms loaded
if (docs != null)
return 2;
} else {
// any metadata
if (labels[kind] != null) {
return 2;
}
File f = new File(this.dataFilebase + labelExtensions[kind]);
if (f.exists()) {
return 1;
}
}
// not loaded
return 0;
}
COM: <s> checks whether the corpus has labels </s>
|
funcom_train/19174839 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IJCalendarItem getSelectedItem() {
if (selection.x == 7) {
}
if (selection.x >= 7 || selection.y >= rows || selection.x < 0
|| selection.y < 0) {
return null;
}
return ((IJCalendarItem[]) weeks.get(selection.y))[selection.x];
}
COM: <s> this method get the day wich was selected with the mouse </s>
|
funcom_train/25190819 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Advertisement generateAdvertisement (Serializable obj, InputStream data) {
AdvertisementGenerator parser = new AdvertisementGenerator (sourceDir, classDir);
parser.removeSourceFiles (removeSource);
Advertisement result = parser.generate (obj, data);
ClassServer server = ClassServer.getClassServer ();
server.addRoot (classDir);
return result;
}
COM: <s> generate advertisement create an advertisement from a serializable object and an xml stream </s>
|
funcom_train/12629172 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void populateField(Field dtoField, PersistentObjectDTO dto, PersistentObject domainObject) {
if (this.fieldIsInitializedValue(dtoField.getName(), dto)) {
this.setFieldValue(dtoField, dto, domainObject);
} else {
Logger.info("Field " + dto.getClass().getName() + "." + dtoField.getName()
+ " has not been initialized. Domain population not needed.");
}
}
COM: <s> populates a domain object field using the name of the dto field specified </s>
|
funcom_train/39109126 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean tryToGenerateNewPassword(HTMLDiv messages) {
// grab whatever is there
Account acc = new Account(userData);
acc.setUsername(username);
acc.setInst(inst);
if (acc.populate()) {
setPassword(LusidUtils.generateString(6, UserIDPasswdTable.SIMPLE_PASSWD_CHARS));
acc.updatePassword();
return true;
}
else {
messages.add(new HTMLParagraph(acc.getMessages()));
return false;
}
}
COM: <s> will set a new password in database </s>
|
funcom_train/36164876 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(CompilerVariable var) {
if((this.getName()).compareTo(var.getName())< 0)
{
return -1;
}
else if((this.getName()).compareTo(var.getName())> 0)
{
return 1;
}
else
return 0;
}
COM: <s> compares one compiler variable to another </s>
|
funcom_train/909325 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void restoreDialogValues() {
IDialogSettings settings = getDialogBoundsSettings();
String name = settings.get(DIALOG_SETTING_PRINTERDATA);
if (name != null) {
PrinterData[] printer = Printer.getPrinterList();
for (PrinterData printerData : printer) {
if(printerData.name.equals(name)) {
preview.setPrinterData(printerData);
break;
}
}
}
}
COM: <s> use the dialog store to restore widget values to the values that they </s>
|
funcom_train/15770398 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection initTaskHistories( Collection taskHistories ){
ArrayList list = new ArrayList();
try{
Iterator i = taskHistories.iterator();
while( i.hasNext() ){
list.add( initTaskHistory( (TaskHistoryVO)i.next() ) );
}
}
catch(Exception e){
e.printStackTrace();
}
return list;
}
COM: <s> creates the collection of task history view by given task histories </s>
|
funcom_train/1303393 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getNumber(File numberedFile) {
int result = -1;
final String name = numberedFile.getName();
final Matcher m = namePattern.matcher(name);
if (m.matches()) {
final String numberString = m.group(1);
result = Integer.parseInt(numberString);
}
return result;
}
COM: <s> get the number part of the numbered file </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.