__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/37017722 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getLink(){
String linkKeyName= null;
String action= getAction();
if(action.equals(MInteraction.courseLink)){ // Good action
if( (getValue() != null) && (getValue().length() > 0) ){ // Good link name
linkKeyName= new String(getValue());
}
}
return linkKeyName;
}
COM: <s> get the name of the link </s>
|
funcom_train/20043871 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void _getImageManager() {
Object o = oObj.getImageManager();
log.println("###### ImageManager ");
XImageManager xImageManager = (XImageManager)UnoRuntime.queryInterface(XImageManager.class, o);
tRes.tested("getImageManager()", xImageManager != null);
}
COM: <s> only a short test </s>
|
funcom_train/37461876 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteJobsByIds( Set<String> jobids ) throws BlastJdbcException {
if ( jobids == null ) {
throw new NullPointerException( "Jobid list must not be null!" );
}
if ( jobids.size() == 0 ) {
throw new IllegalArgumentException( "Jobid list must not be empty!" );
}
for ( String jobid : jobids ) {
deleteJobById( jobid );
}
}
COM: <s> deletes the job entry with the specified uniprot ac </s>
|
funcom_train/6274687 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CharSequence getCoveredText(CharSequence text) {
if (getEnd() > text.length()) {
throw new IllegalArgumentException("The span " + toString() +
" is outside the given text!");
}
return text.subSequence(getStart(), getEnd());
}
COM: <s> retrieves the string covered by the current span of the specified text </s>
|
funcom_train/32156439 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PriorityTree getParent(int id) {
if (this.getRootId() == id)
return null;
for (int i = 0 ; i < children.size() ; i++) {
PriorityTree st = children.elementAt(i);
if (st.root.Id == id)
return this;
else {
PriorityTree sst = st.getParent(id);
if (sst != null)
return sst;
}
}
return null;
}
COM: <s> traverse the tree until the given agent is found </s>
|
funcom_train/35276683 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private float getCameraConstant(Camera cam, float pixelLimit){
float n = cam.getFrustumNear();
float t = FastMath.abs(cam.getFrustumTop());
float A = n / t;
float v_res = cam.getHeight();
float T = (2f * pixelLimit) / v_res;
return A / T;
}
COM: <s> this computes the c value in the geomipmapping paper </s>
|
funcom_train/3464418 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addMedia(MediaTransferableData data) {
if(parent.isClosed()) {
return;
}
String embedTag = new String("<p><embed width=\"" +data.width+ "\" height=\"" +data.height+ "\" src=\"" +data.filename+ "\"></p>");
parent.getTransferHandler().importData(parent, new HtmlTransfer(embedTag));
}
COM: <s> this function adds other media besides pictures movies and sounds </s>
|
funcom_train/1536133 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final protected boolean spherePointRadius(Hits hits) {
if (hits.isEmpty())
return false;
addSelectedPoint(hits, 1, false);
// we got the center point
if (selPoints() == 1) {
((GuiManager3D) app.getGuiManager()).showNumberInputDialogSpherePointRadius(app.getMenu(getKernel().getModeText(mode)),
getSelectedPointsND()[0]);
return true;
}
return false;
}
COM: <s> get center point and number </s>
|
funcom_train/38953318 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Node transf_13(Comprehension compr) {
if (compr.qualifiers.size() > 0)
return compr;
if (compr.monoid.isPrimitive()) {
if (DEBUG) debug("transformation 13 applied");
return compr.head;
} else {
if (DEBUG) debug("transformation 13 applied");
return factory.createUnit(compr.monoid, compr.head);
}
}
COM: <s> m e e if m is a primitive monoid </s>
|
funcom_train/3091335 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void print(String message, ConsoleLevel level) {
Iterator consoleIterator = consoles.iterator();
while(consoleIterator.hasNext()){
ConsoleHandler next = (ConsoleHandler)consoleIterator.next();
if (level.compareTo(next.getMaximumLevel()) <= 0) {
next.print(message, level);
}
}
log(message, level);
}
COM: <s> prints the given message at the given console level in all contained </s>
|
funcom_train/9364811 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void clear() {
mEventType = 0;
mBooleanProperties = 0;
mCurrentItemIndex = INVALID_POSITION;
mItemCount = 0;
mFromIndex = 0;
mAddedCount = 0;
mRemovedCount = 0;
mEventTime = 0;
mClassName = null;
mPackageName = null;
mContentDescription = null;
mBeforeText = null;
mText.clear();
}
COM: <s> clears the state of this instance </s>
|
funcom_train/35843565 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setModelElements(List elements) {
int mSize = elements.size();
for (int i = 0; i < 3 && i < mSize; ++i) {
if (!Model.getFacade().isAModelElement(elements.get(i))) {
throw new IllegalArgumentException(
"The list should contain model elements in "
+ "the first 3 positions");
}
}
mes = elements;
}
COM: <s> set the list of offending model elements </s>
|
funcom_train/2433720 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DownloadDataHolder downloadProject(String projectGUID, ServerCallback callback) throws RemoteException, ServiceException {
CheckoutInterchangeData checkout = getCheckoutInterchangeData(callback);
if (checkout == null) {
// The callback should already have been notified.
return null;
}
logger.info("Asking the server for project definitions");
return checkout.downloadIntegrationProject(user, password, projectGUID);
}
COM: <s> implements the actual call to the web service </s>
|
funcom_train/2965158 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doMain(final String[] args) {
if(args==null) {
LOGGER.config("cmd...[NO_ARGS]");
}
try {
// parse the arguments.
parser.parseArgument(args == null ? new String[0] : args);
checkData();
if( !hasExtraArgument && !arguments.isEmpty()) {
LOGGER.log(Level.SEVERE, "cmd...[ignored_args:{0}]", this.arguments);
}
} catch( CmdLineException e ) {
exitOnException(e);
}
LOGGER.config("cmd...[OK]");
execute();
LOGGER.config("cmd...[END]");
ChocoLogging.flushLogs();
}
COM: <s> parse the command line </s>
|
funcom_train/25039729 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BehaviorLegacy getBehaviorWithId(int id) {
boolean found = false;
BehaviorLegacy behavior = null;
Iterator<BehaviorLegacy> i = behaviors.iterator();
while (!found && i.hasNext()) {
behavior = i.next();
if (id == behavior.getId()) {
found = true;
}
}
if (!found) {
throw new RuntimeException("Cannot find behavior with id: " + id + ". (" + behaviors.size() + " actuators available)");
}
return behavior;
}
COM: <s> get a behavior with a specific id </s>
|
funcom_train/34636449 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void activateEditor(IWorkbenchPage aPage,IStructuredSelection aSelection) {
if (!runActivateEditor){
runActivateEditor = true;
return;
}
if (aSelection == null || aSelection.isEmpty())
return;
if (aSelection.getFirstElement() instanceof Fragment) {
Fragment frag = (Fragment) aSelection.getFirstElement();
FragmentEditorInput input = new FragmentEditorInput(frag);
IEditorPart editor = aPage.findEditor(input);
if (editor != null){
//aPage.activate(editor);
aPage.bringToTop(editor);
runFindSelection = false;
}
}
}
COM: <s> is called if the navigator view selection changes </s>
|
funcom_train/29614268 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getBackCommand() {
if (backCommand == null) {//GEN-END:|24-getter|0|24-preInit
// write pre-init user code here
backCommand = new Command("Voltar", Command.BACK, 0);//GEN-LINE:|24-getter|1|24-postInit
// write post-init user code here
}//GEN-BEGIN:|24-getter|2|
return backCommand;
}
COM: <s> returns an initiliazed instance of back command component </s>
|
funcom_train/20675168 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // private void checkTreeMLSchema(final Schema s) throws DataIOException {
// for (int i = 0; i < s.getColumnCount(); ++i) {
// final Class type = s.getColumnType(i);
// if (TYPES.get(type) == null) {
// throw new DataIOException("Data type unsupported by the TreeML format: "
// + type.getName());
// }
// }
// }
COM: <s> checks if all schema types are compatible with the tree ml specification </s>
|
funcom_train/32894322 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void drawTransition(Graphics g, DfaState state, String trans) {
if (state.isTransToSelf(trans.charAt(0)))
this.drawTransToSelf(g, state, trans);
else
this.drawTransToOther(g, state, trans,
state.getTransition(trans.charAt(0)));
}
COM: <s> draws the transition represented by given information </s>
|
funcom_train/28308588 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean connect() throws Exception {
if (session != null) {
session.close();
}
QueueConnectionFactory connectionFactory = new ActiveMQConnectionFactory(url);
Connection connection = connectionFactory.createConnection();
connection.start();
session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
producer = session.createProducer(session.createQueue(queueName));
return session != null;
}
COM: <s> connects to the queue </s>
|
funcom_train/50141525 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void prepare() throws PersistenceException, AccessException {
//log@debug("Preparing persistence: " + classMolder.getClassDescriptor().getClassClassName());
engine.prepare();
//log@debug("Prepared persistence: " + classMolder.getClassDescriptor().getClassClassName());
}
COM: <s> prepare the persistence </s>
|
funcom_train/22020842 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSource(NodeModelElement newSource) {
// give error if no new source is given
if (newSource == null) {
throw new IllegalArgumentException();
}
// new source is given. change actual source to new source and fire a
// property change
else {
NodeModelElement oldSource = this.source;
this.source = newSource;
firePropertyChange(SOURCE_PROP, oldSource, newSource);
}
}
COM: <s> set the source endpoint of this connection </s>
|
funcom_train/65812 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Table getChoosenTableByName(String name) {
Table table = null, target = null;
Tables choosenTables = getDatabase().getChoosenTables();
for (int i = 0; i < choosenTables.getSize(); i++) {
target = (Table) choosenTables.getElementAt(i);
if (target.getName().equalsIgnoreCase(name)) {
return target;
}
}
return table;
}
COM: <s> returns the table object among the choosen tables referenced by name </s>
|
funcom_train/21105688 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getMiReports() {
if (miReports == null) {
miReports = new JMenuItem("Reports");
miReports.setMnemonic('R');
miReports.addActionListener(new ReportsListener());
miReports.setEnabled(SessionInfo.userAccessLevel <= 1);
}
return miReports;
}
COM: <s> this method initializes mi reports </s>
|
funcom_train/40451906 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCmdAgregarProducto() {
if (cmdAgregarProducto == null) {//GEN-END:|135-getter|0|135-preInit
// write pre-init user code here
cmdAgregarProducto = new Command("Agregar Producto", Command.OK, 0);//GEN-LINE:|135-getter|1|135-postInit
// write post-init user code here
}//GEN-BEGIN:|135-getter|2|
return cmdAgregarProducto;
}
COM: <s> returns an initiliazed instance of cmd agregar producto component </s>
|
funcom_train/45015783 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stateChanged(ChangeEvent e) {
JSlider source = (JSlider)e.getSource();
int fps = (int)source.getValue();
if (!source.getValueIsAdjusting()) { //done adjusting
} else { //value is adjusting; just set the text
label.setText(String.valueOf(fps));
}
}
COM: <s> listen to the slider </s>
|
funcom_train/18050846 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getSvEditChangePasswordMenuItem() {
if (svEditChangePasswordMenuItem == null) {
svEditChangePasswordMenuItem = new JMenuItem();
svEditChangePasswordMenuItem.setText("Change Password...");
svEditChangePasswordMenuItem
.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
changePasswordAction();
}
});
}
return svEditChangePasswordMenuItem;
}
COM: <s> this method initializes sv edit change password menu item </s>
|
funcom_train/39549250 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public String doubleString(double value) {
double absvalue = Math.abs(value);
// above 10e7 we do not output decimals as anyway
// in scientific notation they were not available
if (absvalue >= 10e7 || (int)value == value) {
return Integer.toString((int)value);
}
// under 10e-3 we have to put decimals
else {
return decimalFormat.format(value);
}
}
COM: <s> converts the input double value to a string with a number of </s>
|
funcom_train/12587721 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public QCodeType createQcode(String alias, String code) throws FlexPropTypeException, ControledVocabularyException {
if (alias != null || code != null)
throw new FlexPropTypeException("arguments set can't build a valide qcode");
QCodeType qcode = new QCodeType(alias, code);
if (m_context.isControledVocabularies()) {
URI scheme = checkAliasValidity(alias);
qcode.setSchemeURI(scheme);
}
return qcode;
}
COM: <s> define a qcode without validation </s>
|
funcom_train/32069298 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeBankAccountEntry(BankAccountEntry bankAccountEntry) {
boolean removedOK = getBankAccountEntrys().remove(bankAccountEntry);
if (removedOK) {
bankAccountEntry.setBankAccount(null);
} else {
if (logger.isWarnEnabled()) {
logger.warn("remove returned false");
}
}
return removedOK;
}
COM: <s> remove the passed bank account entry from the bank account collection and unset </s>
|
funcom_train/25523466 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JScrollPane getJspSkillsText() {
if(jspSkillsText == null) {
jspSkillsText = new JScrollPane(getJtaSkillsText());
jspSkillsText.setPreferredSize(new Dimension(350, 125));
jspSkillsText.setSize(new Dimension(350, 125));
jspSkillsText.setMinimumSize(new Dimension(350, 125));
}
return jspSkillsText;
}
COM: <s> get the skills text scroll pane </s>
|
funcom_train/44694900 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void arcRel(float rx, float ry, float xAxisRotation, boolean largeArcFlag, boolean sweepFlag, float x, float y) {
emit(
"a" + rx + " " + ry + " " +
xAxisRotation + " " + flag(largeArcFlag) + " " + flag(sweepFlag) + " " +
x + " " + y);
posX += x;
posY += y;
last = OTHER;
}
COM: <s> invoked when a relative elliptical arc command has been parsed </s>
|
funcom_train/7543867 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addChildBefore(Node newChild, Node node) {
if (newChild.next != null)
throw new RuntimeException(
"newChild had siblings in addChildBefore");
if (first == node) {
newChild.next = first;
first = newChild;
return;
}
Node prev = getChildBefore(node);
addChildAfter(newChild, prev);
}
COM: <s> add child before node </s>
|
funcom_train/11323014 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object execute(CayenneCallback callback) throws DataAccessException {
DataContext context = threadDataContext();
try {
return callback.doInCayenne(context);
} catch (CayenneRuntimeException ex) {
rollbackDataContext(context, ex);
throw convertAccessException(ex);
} catch (CayenneException ex) {
rollbackDataContext(context, ex);
throw convertAccessException(ex);
}
}
COM: <s> main worker method that wraps cayenne calbac execution in spring exception </s>
|
funcom_train/41862554 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getButtonEnviarMensagem() {
if (buttonEnviarMensagem == null) {
buttonEnviarMensagem = new JButton();
buttonEnviarMensagem.setAction(getIniciarChatAction());
buttonEnviarMensagem.setText(MessagesUtil
.getString("PanelJogadores.button.enviarMensagem")); //$NON-NLS-1$
buttonEnviarMensagem.setFont(new Font("Dialog", Font.BOLD, 10)); //$NON-NLS-1$
}
return buttonEnviarMensagem;
}
COM: <s> this method initializes button enviar mensagem </s>
|
funcom_train/593526 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doBeforeStartTag() {
this.oldCssClass = tag.getCssClass();
if (this.oldCssClass != null && this.oldCssClass.length() > 0) {
tag.setCssClass("error " + this.oldCssClass);
}
else {
tag.setCssClass("error");
}
}
COM: <s> ensures that the tags list of css classes includes the error class </s>
|
funcom_train/13187796 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RegularTimePeriod previous() {
Second result = null;
if (this.second != FIRST_SECOND_IN_MINUTE) {
result = new Second(this.second - 1, this.minute);
}
else {
Minute previous = (Minute) this.minute.previous();
if (previous != null) {
result = new Second(LAST_SECOND_IN_MINUTE, previous);
}
}
return result;
}
COM: <s> returns the second preceding this one </s>
|
funcom_train/25093762 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected double phi_Prime(Transaction gammaI, int j, int k) {
final Task tauIK = gammaI.getTau(k);
double phiPrime = gammaI.T();
double divider = PHI(gammaI, k) + tauIK.J();
phiPrime -= mod(divider, gammaI.T());
phiPrime += PHI(gammaI, j);
return phiPrime;
}
COM: <s> 966 sub ijk sub phi strich br </s>
|
funcom_train/29617696 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JScrollPane getJProtectionScrollPane() {
if (jProtectionScrollPane == null) {
jProtectionScrollPane = new JScrollPane();
jProtectionScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
jProtectionScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
jProtectionScrollPane.setBounds(199, 36, 185, 115);
jProtectionScrollPane.setViewportView(getJProtectionField());
}
return jProtectionScrollPane;
}
COM: <s> this method initializes j scroll pane2 </s>
|
funcom_train/517 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isEqual(int boxConfigurationNumber, byte[] boxConfiguration) {
int indexOfBoxConfiguration = boxConfigurationNumber * packedBoardByteSize;
// Compare byte by byte of both box configurations.
for(int byteNo=0; byteNo < boxConfiguration.length; byteNo++) {
if (boxConfigurations[indexOfBoxConfiguration++] != boxConfiguration[byteNo]) {
return false;
}
}
return true;
}
COM: <s> returns whether the two box configurations are equal </s>
|
funcom_train/33465443 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void ensureBuilders() {
if (this.builders == null) {
this.builders =
new ArrayList<SingleFieldBuilder<MType, BType, IType>>(
messages.size());
for (int i = 0; i < messages.size(); i++) {
builders.add(null);
}
}
}
COM: <s> ensures that the list of builders is not null </s>
|
funcom_train/27781418 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setApplyButtonVisibility() {
getLogger().log
(
mName +
".setApplyButtonVisibility() state file set: " + mInputStateOK
);
getLogger().log
(
mName +
".setApplyButtonVisibility() capacity ok: " + mInputCapacityOK
);
mButtonApply.setEnabled(mInputStateOK && mInputCapacityOK);
}
COM: <s> sets the apply button visibility attribute of the panel options object </s>
|
funcom_train/5395863 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRegisterElementWriter() {
System.out.println("registerElementWriter");
String name = "";
ElementWriter ew = null;
DocumentWriter instance = new DocumentWriter();
instance.registerElementWriter(name, ew);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of register element writer method of class org </s>
|
funcom_train/28726478 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createTitle(final Composite composite, final String title) {
final GridData data = new GridData(GridData.GRAB_HORIZONTAL);
data.verticalAlignment = org.eclipse.swt.layout.GridData.FILL;
data.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
data.horizontalSpan = 3;
final Label lblTitle = new Label(composite, SWT.LEFT);
lblTitle.setText(title);
lblTitle.setLayoutData(data);
}
COM: <s> creates the title </s>
|
funcom_train/17591379 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int append(byte[] code) throws BadBytecode {
int size = getCodeLength();
int len = code.length;
if (len <= 0)
return size;
appendGap(len);
byte[] dest = bytecode;
for (int i = 0; i < len; ++i)
dest[i + size] = code[i];
return size;
}
COM: <s> appends the given bytecode sequence at the end </s>
|
funcom_train/19165454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isDoActionMethod(Method method) {
return (
method.getReturnType() == void.class
&& method.getParameterTypes().length==1
&& JDialog.class.isAssignableFrom(method.getParameterTypes()[0])
&& method.getName().startsWith("do")
&& method.getName().endsWith("DialogAction")
);
}
COM: <s> to expose a certain dialog action to the user through raptor </s>
|
funcom_train/43471020 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getZoomfactorAsString(int pintZoomFactor) {
String getZoomfactorAsString = "";
if (pintZoomFactor > 0 && pintZoomFactor <= PFCalendar.arrZoomFactors.length) {
// Unfortunately we have to add one to make numbering consistent.
getZoomfactorAsString = PFCalendar.arrZoomFactors[pintZoomFactor - 1];
}
return getZoomfactorAsString;
}
COM: <s> we keep an array of terms for each of the zoom factors </s>
|
funcom_train/11712972 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setResolvedExternalResourcesAndBindings() throws InvalidXMLException {
AnalysisEngineDescription clonedAe = (AnalysisEngineDescription) aeDescription.clone();
ResourceManagerConfiguration rmc = clonedAe.getResourceManagerConfiguration();
if (null != rmc)
rmc.resolveImports(createResourceManager());
resolvedExternalResourcesAndBindings = rmc;
}
COM: <s> a merge method doesnt fit </s>
|
funcom_train/37611648 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean haveRequisites(Logger logger) throws VersionException {
final String name = "The Grinder " + GrinderBuild.getVersionString();
if (!isAtLeastVersion(1, 5)) {
logger.error("Fatal Error - incompatible version of Java (" + this +
")\n" + name + " requires at least Java 1.5.");
return false;
}
return true;
}
COM: <s> check the jvm is the right version has the right optional </s>
|
funcom_train/33496654 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addSubModel(String name, Object subModel, CoXmlContext context) {
if (subModel instanceof CoJavaMapEntry) {
CoJavaMapEntry mapEntry = (CoJavaMapEntry) subModel;
if (!mapEntry.isComplete()) {
throw new UnsupportedOperationException("Incomplete map entry");
}
m_map.put(mapEntry.getKey(), mapEntry.getValue());
}
}
COM: <s> add an item to the collection </s>
|
funcom_train/50241996 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int print(Graphics graphics, PageFormat pageFormat, int pageIndex) throws PrinterException {
if(pageIndex >= 1) return Printable.NO_SUCH_PAGE;
((Graphics2D)graphics).translate(pageFormat.getImageableX(),pageFormat.getImageableY());
((Graphics2D)graphics).scale(.85,.85);
paintReceipt(graphics);
return Printable.PAGE_EXISTS;
}
COM: <s> this method is called by the printer job to print all the pages </s>
|
funcom_train/29715119 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int binsearch(int num) {
int left = 0;
int right = dividers.length-1;
int index = right - left / 2;
while(left < right) {
index = (right + left) / 2;
if (num == dividers[index]) {
return num;
} else if (num > dividers[index]) {
left = index+1;
} else if (num < dividers[index]) {
right = index-1;
}
}
return dividers[left];
}
COM: <s> performs a binary search on the dividers array for the given number </s>
|
funcom_train/22951334 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initGeneration() {
MyRandom rndWithoutRep = new MyRandom(initGeneration.length);
generation = new TreeNode[generationSize];
age = new int[generationSize];
fitness = new double[generationSize];
int idx;
for (int i=0;i<generationSize;i++) {
idx = rndWithoutRep.getRandom(initGeneration.length);
generation[i] = createTemplate(initGeneration[idx]);
}
}
COM: <s> creates initial generation from previously supplied fitness nodes </s>
|
funcom_train/826062 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void exportDone(Transferable data, int action) {
if (!data.isDataFlavorSupported(DataFlavors.TIME_SLOT)) {
return;
}
TimeSlotTransferData transferData = getTransferData(data);
transferData.setMarkedAsMoving(action == TransferHandler.MOVE);
doActionIfNeed(transferData);
transferData.setWasDnDAction();
}
COM: <s> do export dn d action within selected transferable and action </s>
|
funcom_train/21105856 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MJCheckBox getchBS_BKDT() {
if (chBS_BKDT == null) {
chBS_BKDT = new MJCheckBox();
chBS_BKDT.setText("Bank dt.");
chBS_BKDT.setHorizontalTextPosition(javax.swing.SwingConstants.LEADING);
chBS_BKDT.setThreeStates(true);
}
return chBS_BKDT;
}
COM: <s> this method initializes ch bs bkdt </s>
|
funcom_train/33107562 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setQty(BigDecimal qty, int C_UOM_ID) {
m_qty = MUOMConversion.convert(C_UOM_ID, m_C_UOM_ID, qty, true); // StdPrecision
if (qty != null && m_qty == null) // conversion error
{
log.severe("Conversion error - set to " + qty);
m_qty = qty;
} else
m_C_UOM_ID = C_UOM_ID;
} // setQty
COM: <s> set quantity in uom </s>
|
funcom_train/32947854 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setGenerationGap( float gap ) throws PropertyVetoException {
if ( gap < 0.0 || gap > 1.0 ) {
throw new PropertyVetoException( "value must fulfill: 0.0 <= value <= 1.0",
new PropertyChangeEvent( this, "generationGap", new Float( this.generationGap ), new Float( gap ) ) );
} else {
generationGap = gap;
}
}
COM: <s> sets the generation gap </s>
|
funcom_train/51093449 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateScore( boolean gotItRight ){
totalGuesses++;
if ( gotItRight ){
correctGuesses++;
currentScore.setText( messages.getString("scoreLabel") + " " + correctGuesses + " / " + totalGuesses );
}
else {
currentScore.setText( messages.getString("scoreLabel") + " " + correctGuesses + " / " + totalGuesses );
}
}
COM: <s> creates a new code update score code instance </s>
|
funcom_train/48664237 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CounterValue execute(CounterValue[] args, CounterType[] types) {
// If no arguments then function was defined incorrectly
// so return 0 so the user can still see something.
if (args.length < 1) {
return new CounterValueDouble(0);
}
// Just add the param to the internal value and return
fAccumulator += args[0].getDouble();
return new CounterValueDouble(fAccumulator);
}
COM: <s> accumulates the value of the only parameter to an internal sum </s>
|
funcom_train/1185118 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void finish() throws IOException {
closeEntry();
cdOffset = written;
for (int i = 0, entriesSize = entries.size(); i < entriesSize; i++) {
writeCentralFileHeader((ZipEntry) entries.elementAt(i));
}
cdLength = written - cdOffset;
writeCentralDirectoryEnd();
offsets.clear();
entries.removeAllElements();
}
COM: <s> finishs writing the contents and closes this as well as the </s>
|
funcom_train/28347293 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setWrapDataProperty(boolean wrapData) {
this.wrapData = wrapData;
if (wrapData) {
int nP = gd.getSize();
for (int i = 1; i < nP; i++) {
gd.setPoint(i, gd.getX(i), unwrap(gd.getY(i), gd.getY(i - 1)));
}
gd.findMinMax();
}
}
COM: <s> sets the wrap data property attribute of the array viewer pv object </s>
|
funcom_train/27824389 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void executeQuery(String queryString) {
try {
((OIModelSearchTableModel)m_oimodelEntityTable.getModel()).executeQuery(queryString);
}
catch (KAONException e) {
m_oimodelerViewable.getModule().getAppDriver().displayErrorNotification(e);
}
}
COM: <s> executes the specified query on the oi model </s>
|
funcom_train/37829963 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onAction(final Player player, final RPAction action) {
if (countBuddies(player) > 500) {
player.sendPrivateText(NotificationType.ERROR, "Sorry, you have already too many buddies");
return;
}
final String who = action.get(TARGET);
DBCommand command = new QueryCanonicalCharacterNamesCommand(player, Arrays.asList(who));
DBCommandQueue.get().enqueueAndAwaitResult(command, handle);
TurnNotifier.get().notifyInTurns(0, new TurnListenerDecorator(this));
}
COM: <s> starts to handle a buddy action </s>
|
funcom_train/11677575 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InputSource resolveEntity(String targetNamespace, String schemaLocation, String baseUri) {
InputSource result = null;
if (resourceMap != null) {
result = resourceMap.resolve(synCfg, schemaLocation);
}
if (result == null) {
result = new InputSource(SynapseConfigUtils.resolveRelativeURI(baseUri, schemaLocation));
}
return result;
}
COM: <s> resolve a schema import </s>
|
funcom_train/9184229 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void ShowAll() {
System.out.println("Show the contents of replicaRegistra.");
for (TupleType type : policyMap.keySet()) {
System.out.println("Type = " + type + " ,");
HashMap<Location, ReplicationPolicy> inner = policyMap.get(type);
if (inner != null) {
for (Location loc : inner.keySet())
System.out.println(" Location = " + loc
+ " and Replication Policy = " + inner.get(loc));
}
}
}
COM: <s> show the contents of policy registrar </s>
|
funcom_train/50694527 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void calculateStructures() {
if (monomerCount < 4)
return;
float[] angles = calculateAnglesInDegrees();
byte[] codes = calculateCodes(angles);
checkBetaSheetAlphaHelixOverlap(codes, angles);
byte[] tags = calculateRunsFourOrMore(codes);
extendRuns(tags);
searchForTurns(codes, angles, tags);
addStructuresFromTags(tags);
}
COM: <s> uses levitt greer algorithm to calculate protein secondary </s>
|
funcom_train/13541770 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDisplayName(String sName) {
OfficeStyle style = getStyle(sName);
if (style==null) { return null; }
if (style.isAutomatic()) {
style = getStyle(style.getParentName());
if (style==null) { return null; }
}
return style.getDisplayName();
}
COM: <s> get the display name for the style with the specified name </s>
|
funcom_train/11729180 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetVersionableUUID() throws RepositoryException {
// create version
versionableNode.checkout();
Version version = versionableNode.checkin();
assertEquals("Method getVersionableUUID() must return the UUID of the corresponding Node.",
version.getContainingHistory().getVersionableUUID(),
versionableNode.getUUID());
}
COM: <s> tests if version history </s>
|
funcom_train/11074349 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetNewKey() {
// Using a "simple" path
assertXPathSetValue(context, "map/Key4", new Integer(7));
// Using a "non-simple" path
assertXPathPointerLenient(context, "//map/Key5", "/map/Key5");
assertXPathSetValue(context, "//map/Key5", new Integer(8));
}
COM: <s> the key does not exist but the assignment should succeed anyway </s>
|
funcom_train/25196481 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean log(Level level, String tag, Object... args) {
try {
logger.log(level, //
MessageFormat.format(bundle.getString(tag), args));
} catch (MissingResourceException e) {
logger.severe(MessageFormat.format(bundle.getString("missing.tag"),
tag));
}
return false;
}
COM: <s> log a message </s>
|
funcom_train/46760652 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Long getPatientIdFromTransaction(final PatientModel externalPatient, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
IChainStore chain = new ChainStore();
try {
long patientId = getPatientIdFromTransaction(externalPatient, chain, call);
chain.execute();
return patientId;
} catch (Exception ex) {
Log.exception(ex);
chain.rollback();
throw ex;
}
}}; return (Long) call(method, call);
}
COM: <s> get and or possibly add the patient which get from an external system </s>
|
funcom_train/7645631 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getActualMinimum(int field) {
int value, next;
if (getMinimum(field) == (next = getGreatestMinimum(field))) {
return next;
}
complete();
long orgTime = time;
set(field, next);
do {
value = next;
roll(field, false);
next = get(field);
} while (next < value);
time = orgTime;
areFieldsSet = false;
return value;
}
COM: <s> gets the minimum value of the specified field for the current date </s>
|
funcom_train/8497604 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void storeMetadata(int documentId, byte[] content, String metadataFileName) throws IOException {
Document doc = documentDao.getById(documentId);
String directory = doc.getFilePath();
String fullFilePath = directory + File.separator + metadataFileName;
File file = new File(fullFilePath);
if(file.exists()){
FileUtils.forceDelete(file);
}
FileUtils.writeByteArrayToFile(file, content);
}
COM: <s> store this metadata in a file in the saem directory as the document </s>
|
funcom_train/20351493 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getProcessingCost() {
//cloudlet cost: execution cost...
//double cost = getProcessingCost();
double cost = 0;
//...plus input data transfer cost...
cost += this.accumulatedBwCost;
//...plus output cost
cost += this.costPerBw * getCloudletOutputSize();
return cost;
}
COM: <s> gets the total cost of processing or executing this cloudlet </s>
|
funcom_train/32892184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isARootParent (String s)
{ return (("").equals(s) && super.isEmpty()) || s.length()==0
|| branchName.startsWith(s)
|| XMLUtils.getGenericName(branchName,false).startsWith
(XMLUtils.getGenericName(s,false));
}
COM: <s> check if the branch name begins with a certain xml name </s>
|
funcom_train/6457226 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() {
mServletURLString = this.getParameter("ServletURL");
mForumFileString = this.getParameter("ForumFile");
try {
mForumURL = new URL(mServletURLString);
} catch (MalformedURLException murle) {
murle.printStackTrace();
}
mStatus.setText(mAppletLocale.getLoadingText());
mMessageHolder = getMessageHolder();
mMessageHolder.getTree(0);
}
COM: <s> sta the applet </s>
|
funcom_train/33851149 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TypeQualifierAnnotation getParameter(MethodDescriptor methodDesc, int param, TypeQualifierValue tqv) {
//
// TODO: handling of overridden methods?
//
Map<TypeQualifierValue, TypeQualifierAnnotation> map = parameterMap.get(methodDesc, param);
if (map == null) {
return null;
}
return map.get(tqv);
}
COM: <s> get the type qualifier annotation on a parameter </s>
|
funcom_train/8362776 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void defineVariable(String varName, Object varValue, boolean overwrite) {
ScraperContext context = scraper.getContext();
if (overwrite || context.get(varName) == null) {
Variable var = CommonUtil.createVariable(varValue);
context.put(varName, var);
}
}
COM: <s> adds or replaces variable in scrapers context </s>
|
funcom_train/20045291 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void _getText() {
requiredMethod("setString()");
requiredMethod("getStart()");
requiredMethod("getEnd()");
XText txt = oObj.getText() ;
tRes.tested( "getText()", txt != null &&
txt.getString().equals("StartMiddle"));
}
COM: <s> gets the text of the range and retrieves its string content </s>
|
funcom_train/33063947 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleHit(String event) {
String[] strings = event.split(" ");
if (strings.length == 4) {
String fv = strings[3];
int j = fv.indexOf("::");
if (j > 0) {
String fcn = fv.substring(0, j);
String var = fv.substring(j + 2);
if (getVariableName().equals(var) && getFunctionName().equals(fcn)) {
setSuspendType(strings[2]);
//notifyThread();
}
}
}
}
COM: <s> determines if this breakpoint was hit and notifies the thread </s>
|
funcom_train/2888140 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close(){
try{
if( repository != null ){
repository.close();
repository = null;
}
if( hostManager != null ){
hostManager.close();
hostManager = null;
}
if( hostGroupManager != null){
hostGroupManager.close();
hostGroupManager = null;
}
if( settings != null ){
settings.close();
settings = null;
}
if( activeProfileManager != null ){
activeProfileManager.close();
activeProfileManager = null;
}
if( null != helper ){
// this closes the database itself
helper.close();
helper = null;
}
}catch(Exception e){
// dont stop just log
log.error(e);
}
}
COM: <s> cleanup all resources </s>
|
funcom_train/12663155 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean validate() {
for (int i = 0; i < REQUIRED_ATTRIBUTES.length; i++) {
if (hasAttribute(REQUIRED_ATTRIBUTES[i])) {
} else {
System.err.println("attribute was not found in manifest: " + REQUIRED_ATTRIBUTES[i]);
return false; // attr wasn't in manifest!
}
}
return true;
}
COM: <s> checks each required attribute and returns false if one is found missing </s>
|
funcom_train/42068123 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addFormatDependantDataPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ChunkFact_formatDependantData_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ChunkFact_formatDependantData_feature", "_UI_ChunkFact_type"),
WavPackage.Literals.CHUNK_FACT__FORMAT_DEPENDANT_DATA,
false,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the format dependant data feature </s>
|
funcom_train/21905816 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean canImport(TransferHandler.TransferSupport info) {
// Check for String flavor
if(info.isDataFlavorSupported(DataFlavor.stringFlavor)) {
info.setDropAction(COPY);
return true;
}
try {
if (info.isDataFlavorSupported(ResourceScheduleItem.getDataFlavor())) {
info.setDropAction(MOVE);
return true;
}
} catch (Exception e) {
return false;
}
return false;
}
COM: <s> we only support importing strings </s>
|
funcom_train/23410384 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addForTaskPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Plan_forTask_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Plan_forTask_feature", "_UI_Plan_type"),
TasksPackage.Literals.PLAN__FOR_TASK,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the for task feature </s>
|
funcom_train/3703554 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JPanel createSometimesPanel() {
JPanel p = new JPanel();
p.setLayout(new BorderLayout());
if (pSometimesCenter == null) {
pSometimesCenter = createSometimesOptionsPanel();
}
p.add(pSometimesCenter, BorderLayout.CENTER);
p.add(createSometimesButtonsPanel(), BorderLayout.SOUTH);
return (p);
} // of method
COM: <s> create the panel that appears for sometimes </s>
|
funcom_train/49048874 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private CultureType getCulture (ContentElementType inContent) {
CultureType culture = null;
Iterator anyIter= inContent.getAny().iterator();
while (anyIter.hasNext()) {
Object anAny = anyIter.next();
if (anAny instanceof CultureType) {
culture = (CultureType) anAny;
break;
}
}
return culture;
}
COM: <s> get the culture object from a content any list </s>
|
funcom_train/1578227 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadConstant(final float value) {
if ( value == 0 ) {
addCode(1, Opcode.FCONST_0);
} else if ( value == 1 ) {
addCode(1, Opcode.FCONST_1);
} else if ( value == 2 ) {
addCode(1, Opcode.FCONST_2);
} else {
ConstantInfo info = ConstantFloatInfo.make(mCp, value);
mInstructions.new LoadConstantInstruction(1, info);
}
}
COM: <s> generates code that loads a constant float value onto the stack </s>
|
funcom_train/26068737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GasSource getGasSourceAtDepth(int depth) {
/*if(mItems.isEmpty()) {
mItems.addAll(mItemFetcher.lookupItems(this));
}*/
final Iterator<Item> it = mItems.iterator();
GasSource last_gas = null;
while(it.hasNext()) {
final Item i = it.next();
if(i.getMaxDepth() > depth) {
break;
} else {
last_gas = i.getGasSource();
}
}
return last_gas;
}
COM: <s> determine which gas to use at any depth according to this decoset </s>
|
funcom_train/27758227 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handlePreferences(ApplicationEvent ae) {
if(mainApp != null){
new Thread() {
public void run() {
Prefs.doPreferences();
}
}.start();
ae.setHandled(true);
}
else{
throw new IllegalStateException(
"handlePreferences: Dx instance detached from listener");
}
}
COM: <s> handle the preferences dialog </s>
|
funcom_train/45076309 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
try {
refreshPidsTree();
} catch (Exception e) {
System.err.println("Some uncaught exception: " + e);
System.err.println(e.getMessage());
e.printStackTrace();
} finally {
refreshThread = null;
}
} // end run()
COM: <s> implementation of the runnable interface used to start the refresh </s>
|
funcom_train/28875043 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateInternal() {
if (Shared.option.isHexNotationInsertChanged()) {
jCheckBoxHexNotation.setSelected(Shared.option.isHexNotationInsert());
}
dataTableModelAbsNote.setHexNotation(jCheckBoxHexNotation.isSelected());
dataTableModelAbsNote.fireTableDataChanged();
}
COM: <s> update internal state to call before make it visible </s>
|
funcom_train/1300785 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TermSynonym addTermSynonym(Synonym.Type synonymType) {
final TermSynonym result = new TermSynonym(synonymType);
final Tree<Data> termSynonymNode = new Tree<Data>(result);
// add child through the strategy so all connections are properly made
TREE_BUILDER_STRATEGY.addChild(getNode(), termSynonymNode);
return result;
}
COM: <s> add a term synonym to this concept term with the given synonym type </s>
|
funcom_train/1844750 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerListener(final PortableTagFilter.Listener l) {
l.setTagFilter(this);
final Iterator<String> i = l.interestingTagNames();
while (i.hasNext()) {
String name = i.next();
name = name.toLowerCase();
if (listenersByTagName.get(name) == null)
listenersByTagName.put(name, new ArrayList<PortableTagFilter.Listener>());
listenersByTagName.get(name).add(l);
}
}
COM: <s> register a listener to receive and possibly modify tags </s>
|
funcom_train/18743570 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SaveAction getSaveAction(ResourceKind resource) {
SaveAction result = this.saveActionMap.get(resource);
if (result == null) {
this.saveActionMap.put(resource, result =
new SaveAction(this.simulator, resource, false));
}
return result;
}
COM: <s> returns the save action for a given resource kind </s>
|
funcom_train/10231036 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void processClientKeyExchange(BigInteger dh_y) {
this.m_keyexchangealgorithm.processClientKeyExchange(dh_y);
calculateKeys(this.m_keyexchangealgorithm.calculateKeys(), false);
m_hmacInput.init(new KeyParameter(m_servermacsecret));
m_hmacOutput.init(new KeyParameter(m_clientmacsecret));
}
COM: <s> processes the client key exchange </s>
|
funcom_train/46622394 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FixCRLF () {
tabs = ASIS;
if (Os.isFamily("mac")) {
ctrlz = REMOVE;
eol = CR;
eolstr = "\r";
} else if (Os.isFamily("dos")) {
ctrlz = ASIS;
eol = CRLF;
eolstr = "\r\n";
} else {
ctrlz = REMOVE;
eol = LF;
eolstr = "\n";
}
}
COM: <s> defaults the properties based on the system type </s>
|
funcom_train/48553029 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(TransformMatrix t){
int i, j;
for(i = 0; i < 3; ++i){
for(j = 0; j < 3; ++j){
if(Math.abs(m[i][j] - t.m[i][j]) > Vector3D.EPSILON)
return false;
}
}
return true;
}
COM: <s> evaluates if two matrices are equal comparing all its entries </s>
|
funcom_train/16423010 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JSplitPane getSplitPane() {
if (splitPane == null) {
splitPane = new JSplitPane();
splitPane.setContinuousLayout(true);
splitPane.setEnabled(true);
splitPane.setDividerLocation(300);
splitPane.setDividerSize(7);
splitPane.setLeftComponent(getLeftTabbledPane()); // Generated
splitPane.setRightComponent(getRightTabbledPane()); // Generated
splitPane.setOneTouchExpandable(true);
}
return splitPane;
}
COM: <s> this method initializes split pane </s>
|
funcom_train/46882612 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onPostStartup() {
if( logger.isInfoEnabled() ) {
logger.info("onPostStartup()");
}
ActionCommand command = (ActionCommand) getApplication().getActiveWindow().getCommandManager().getCommand("searchAmazonCommand");
command.execute();
}
COM: <s> called when the application has fully started </s>
|