__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/3966516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setElement(int i, int j, Complex e){
if (i >= this.getWidth()){
throw new IllegalArgumentException("Argument reference element out of array bounds in matrix width:" + i);
}
else if (j >= this.getHeight()){
throw new IllegalArgumentException("Argument reference element out of array bounds in matrix height:" + j);
}
m[i][j] = e;
}
COM: <s> set an element of this matrix </s>
|
funcom_train/783624 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void exiting(String sourceClass, String sourceMethod) {
if (internalIsLoggable(Level.FINER)) {
LogRecord record = new LogRecord(Level.FINER, "RETURN"); //$NON-NLS-1$
record.setLoggerName(this.name);
record.setSourceClassName(sourceClass);
record.setSourceMethodName(sourceMethod);
setResourceBundle(record);
log(record);
}
}
COM: <s> logs a message indicating existing a method </s>
|
funcom_train/31456766 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void scheduleUpdate(int AverageTimeSlice, SchedulerHandler han) {
handler = han;
averageTimeSlice = AverageTimeSlice;
Collection<DigitalOrganism> allOrgs = han.getAllOrganisms();
int size = allOrgs.size();
if ( size < 1 )
size = 1;
orgs = new ArrayBlockingQueue<DigitalOrganism>(size, false, allOrgs);
stats = han.getStatistics();
newStats = new UpdateStatistics();
go.release(bar.getParties());
}
COM: <s> it schedules the executing of each digital organisms </s>
|
funcom_train/10204890 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addLowerBoundPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_MTypedElement_lowerBound_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_MTypedElement_lowerBound_feature", "_UI_MTypedElement_type"),
ClassDiagramPackage.Literals.MTYPED_ELEMENT__LOWER_BOUND,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the lower bound feature </s>
|
funcom_train/4225147 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void encode(Chromosome c, double d, int i) {
// normalize to numeric [0, 1]
d -= min[i];
d /= max[i];
// Max no of bits
int m = 1 << len[i];
// now the value goes in numeric [0, max no of bits]
int n = (int) (m * d);
encode(c.b, n, Gray[i], pos[i], len[i]);
}
COM: <s> enocdes a number from numeric min max </s>
|
funcom_train/28983823 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stopTrackingElement(Object e) {
//Ignore nulls
if (e == null) return;
//remove reference for the new element
boolean elementStillPresent = refs.removeReference(e);
//TODO is instanceof here a performance issue?
//If the element is no longer in the list, and is a bean,
//we need to stop listening to it
if (!elementStillPresent) {
if (e instanceof Bean) {
((Bean)e).props().removeInternalListener(listener);
}
}
}
COM: <s> stop tracking an element remove it from reference counts </s>
|
funcom_train/23410366 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addVersionPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_InputMessageMap_version_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_InputMessageMap_version_feature", "_UI_InputMessageMap_type"),
TasksPackage.Literals.INPUT_MESSAGE_MAP__VERSION,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the version feature </s>
|
funcom_train/39949881 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ButtonGroup getButtonGroupFileSystem() {
if (buttonGroupFileSystem == null) {
buttonGroupFileSystem = new ButtonGroup();
buttonGroupFileSystem.add(this.getJRadioButtonNone());
buttonGroupFileSystem.add(this.getJRadioButtonGarbageCollection());
buttonGroupFileSystem.add(this.getJRadioButtonNotification());
buttonGroupFileSystem.add(this.getJRadioButtonMeeting());
}
return buttonGroupFileSystem;
}
COM: <s> this method initializes button group file system </s>
|
funcom_train/13198729 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showDocument(String documentName, String windowName) {
URL url = null;
try {
url = new URL(getAPIBase() + documentName);
} catch (MalformedURLException e) {
System.err.println("Malformed URL: " + documentName);
} // catch
if (url != null) {
getAppletContext().showDocument(url, windowName);
} // if
}// showDocument
COM: <s> used to open a new browser window to a given url </s>
|
funcom_train/12774662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasNormalEdge(BasicBlock src, BasicBlock dest) {
if (dest == null) {
throw new IllegalArgumentException("dest is null");
}
if (dest.isExitBlock()) {
int srcNum = getNumber(src);
return delegate.getNormalToExit().get(srcNum);
}
return delegate.hasNormalEdge(getUnderlyingBlock(src), getUnderlyingBlock(dest));
}
COM: <s> has normal edge src dest </s>
|
funcom_train/3306061 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer result = new StringBuffer(this.getClass()+" (sessionId: "+sessionId+"):\n");
for (Iterator iter = this.iterator(); iter.hasNext();) {
Command command = (Command) iter.next();
result.append(command.getCmdClass()+"."+command.getCmdMethod()+"\n");
}
return result.toString();
}
COM: <s> prints commandbatch with all its command names </s>
|
funcom_train/13364308 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getMaxCharsWithSign() {
if (!isLastPart) {
return (getMaxChar() - current_max_chars);
} else {
return (current_max_chars-ALLOWED_OVERSIZE-(s.getStringConfig(Service.SIGN).length()>0?s.getStringConfig(Service.SIGN).length()+1:0));
}
}
COM: <s> used to retrieve this form compose maximum allowed size minus signature length </s>
|
funcom_train/3412890 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPixels(int x, int y, int w, int h, double dArray[]) {
sampleModel.setPixels(x-sampleModelTranslateX,y-sampleModelTranslateY,
w,h,dArray,dataBuffer);
}
COM: <s> sets all samples for a rectangle of pixels from a double array containing </s>
|
funcom_train/27782594 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void store(DataOutput os) throws IOException {
os.writeBoolean(forward);
os.writeInt(BY);
os.writeInt(tries.size());
Enumeration e = tries.elements();
while (e.hasMoreElements()) {
((Trie) e.nextElement()).store(os);
}
}
COM: <s> write this data structure to the given output stream </s>
|
funcom_train/10257902 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dispatch(Object source, int type, Object argument) {
for (Iterator i = processors.iterator(); i.hasNext();) {
WeakReference ref = (WeakReference)i.next();
MessageProcessor p = (MessageProcessor)ref.get();
// Remove from list if the back-end object has been GC'd
if (p == null)
i.remove();
else
p.processMessage(source, type, argument);
}
}
COM: <s> dispatches a message </s>
|
funcom_train/10373698 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void forwardToErrorPage(Request request, HttpServletResponse response) {
RequestDispatcher disp = request.getRequestDispatcher(erroryPage);
try {
disableClientCache(response);
disp.forward(request.getRequest(), response);
response.flushBuffer();
} catch (Throwable t) {
logger.warn("Unexpected error forwarding to error page", t);
}
}
COM: <s> called to forward to the error page </s>
|
funcom_train/22314014 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void refreshUI() {
super.refreshUI();
logger.debug("refreshUI");
remoteDevicePanel.disconnectButton.setEnabled( isConnected() && storeSession.count() == 0 );
actionsPanel.sendButton.setEnabled( isConnected() && storeSession.count() == 0 );
actionsPanel.cancelButton.setEnabled( storeSession.count() != 0 );
SwingUtilities.invokeLater( new ProgressBarUpdater() );
}
COM: <s> refresh the gui </s>
|
funcom_train/8086577 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ThreadMXBean getThreadMonitor() {
if (m_ThreadMonitor == null) {
m_ThreadMonitor = ManagementFactory.getThreadMXBean();
if (!m_ThreadMonitor.isThreadCpuTimeEnabled())
m_ThreadMonitor.setThreadCpuTimeEnabled(true);
m_ThreadID = Thread.currentThread().getId();
}
return m_ThreadMonitor;
}
COM: <s> returns a new thread monitor if the current one is null e </s>
|
funcom_train/9365025 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEnabled(boolean enabled) {
if (enabled == isEnabled()) return;
setFlags(enabled ? ENABLED : DISABLED, ENABLED_MASK);
/*
* The View most likely has to change its appearance, so refresh
* the drawable state.
*/
refreshDrawableState();
// Invalidate too, since the default behavior for views is to be
// be drawn at 50% alpha rather than to change the drawable.
invalidate();
}
COM: <s> set the enabled state of this view </s>
|
funcom_train/42638847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setStep(Number step){
if(stepAlg==null){
setStepAlgorithm(new FixedStepAlgorithm(getODEProblem(), step));
}else if(stepAlg instanceof FixedStepAlgorithm){
((FixedStepAlgorithm)stepAlg).setStep(step);
}else if(stepAlg instanceof AdaptStepAlgorithm){
((AdaptStepAlgorithm)stepAlg).setMaximumStep(step);
}else return false;
return true;
}
COM: <s> if adapt step algorithm is already set its maximum step will be changed </s>
|
funcom_train/18208432 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Department getParentDepartment(Department child) throws ServerNotAvailableException, NoSuchObjectException, NullPointerException{
if (child == null) {
throw new NullPointerException();
}
child = (Department)getPersistenceManager().loadObjectById(Department.class, child.getId());
if (child == null) {
throw new NoSuchObjectException();
}
child = (Department)getPersistenceManager().loadObjectById(Department.class, child.getId());
Department parent = child.getParent();
return parent;
}
COM: <s> gets parent department for a given child department </s>
|
funcom_train/39399222 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void logDomain2IP(Vector<String> domains) {
String insertQuery = "INSERT INTO sys_domain2ip (domain, ip) VALUES (?,NULL)";
for (String domain : domains) {
if (domain != null) {
try {
sqlUtils.submitUpdate(insertQuery,domain);
} catch (SQLException e) {
// the domain has already been in there... skip this one
}
}
}
}
COM: <s> logs all domains that are not code null code into tabel sys domain2ip </s>
|
funcom_train/5593805 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testWho() {
System.out.println("testWho");
sender.who("*.com", false);
assertEquals("WHO *.com", bufferToString());
sender.who("*.com", true);
assertEquals("WHO *.com o", bufferToString());
}
COM: <s> test of who method of class net </s>
|
funcom_train/21508432 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void attachChild(UIContainer child) {
if(child == null) return;
if( children.contains(child) ) return;
child.removeFromParent();
if(child.isActive()) {getDisplayNode().attachChild( child.getDisplayNode() );}
children.add(child);
child.setParent(this);
//child.updatePosition(true); // Removed as setParent does an updatePosition.
}
COM: <s> adds a child container which will be processed whenever this container is </s>
|
funcom_train/51616221 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void makeConfigs() throws BaseException, FileNotFoundException {
new java.io.File(this.getName() + "/team_templates/").mkdirs();
for( TeamInfo t : teamInfos )
cdx.scorebot.util.io.XStreamWrapper.toXML( getFilename(t), t.makeConfig() );
}
COM: <s> make configuration files for each team </s>
|
funcom_train/13271770 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setXStart(float xStart) {
if (xStart != this.xStart) {
float oldXStart = this.xStart;
this.xStart = xStart;
this.shapeCache = null;
this.propertyChangeSupport.firePropertyChange(Property.X_START.name(), oldXStart, xStart);
}
}
COM: <s> sets the start point abscissa of this dimension line </s>
|
funcom_train/32776766 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int checkMouseClick(double x, double y) {
// nicht besonders effizient, funktioniert aber erstmal...
int index = -1;
boolean inside = false;
for (int i = 0; i < this.pGrid.length && !inside; i++) {
inside = this.pGrid[i].contains(x, y);
if (inside) {
index = i;
}
}
return index;
}
COM: <s> tests if the mouse click with the given coordinates x y occured inside </s>
|
funcom_train/12199764 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void replaceExtraOptional(TLV tlv) {
int size = extraOptionalParameters.size();
TLV existing = null;
short tlvTag = tlv.getTag();
for (int i = 0; i < size; i++) {
existing = extraOptionalParameters.get(i);
if ((existing != null) && (existing.getTag() == tlvTag)) {
extraOptionalParameters.set(i, tlv);
return;
}
}
registerExtraOptional(tlv); // the optional param wasn't found
}
COM: <s> replaces the tlv in the extra optional parameters list with the </s>
|
funcom_train/49996221 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Project getProject(String projectName, String projectOwner) {
if (projectName == null) {
return null;
}
for (Project project : getProjectList()) {
if (projectName.equals(project.getName()) &&
(projectOwner == null || projectOwner.equals(project.getOwner()))) {
return project;
}
}
return null;
}
COM: <s> returns a project instance that available to current user and </s>
|
funcom_train/4853200 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getRootHrefs () {
StringBuffer buf = new StringBuffer ();
if (roots != null) {
for (int i=0; i<roots.length; ++i) {
if (buf.length() > 0)
buf.append ('\n');
buf.append (roots[i].getURL().toExternalForm());
}
}
return buf.toString ();
}
COM: <s> get starting points of crawl as a string of newline delimited urls </s>
|
funcom_train/2428329 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPriority(MessagePriority p) {
if (p == null) {
throw new IllegalArgumentException("p cannot be null");
}
MessagePriority old = getPriority();
setProperty(PRIORITY, p.getJmsSpecValue());
if (!p.equals(old)) {
firePropertyChange(PRIORITY, old, p);
}
}
COM: <s> sets the priority of this message </s>
|
funcom_train/34341416 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getCodigoCliente() {
if (CodigoCliente == null) {//GEN-END:|23-getter|0|23-preInit
// write pre-init user code here
CodigoCliente = new TextField("CodigoCliente ", null, 5, TextField.NUMERIC);//GEN-LINE:|23-getter|1|23-postInit
// write post-init user code here
}//GEN-BEGIN:|23-getter|2|
return CodigoCliente;
}
COM: <s> returns an initiliazed instance of codigo cliente component </s>
|
funcom_train/37645110 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateSearchButtons() {
if (GnutellaController.getInstance().isActiveSearch()) {
String query = GnutellaController.getInstance()
.getActiveSearchQuery();
addSearchToCombo(query);
m_stopButton.setEnabled(true);
m_searchButton.setEnabled(false);
}
}
COM: <s> updates the search ui in case an other search was performed </s>
|
funcom_train/19051420 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void importStyleSheet(URL url) {
try {
InputStream is;
is = url.openStream();
Reader r = new BufferedReader(new InputStreamReader(is));
// Changed by dhiraj khurana
RCssParser parser = new RCssParser();
parser.parse(url, r, false, true);
//SAC_CSSBridge test=new SAC_CSSBridge(new RCssParser(),r,false);
r.close();
is.close();
} catch (Throwable e) {
// on error we simply have no styles... the html
// will look mighty wrong but still function.
}
}
COM: <s> imports a style sheet from code url code </s>
|
funcom_train/39816519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String bindParameterLists(Map namedParamsCopy) {
String query = this.queryString;
Iterator iter = namedParameterLists.entrySet().iterator();
while ( iter.hasNext() ) {
Map.Entry me = (Map.Entry) iter.next();
query = bindParameterList( query, (String) me.getKey(), (TypedValue) me.getValue(), namedParamsCopy );
}
return query;
}
COM: <s> warning adds new parameters to the argument by side effect </s>
|
funcom_train/12812411 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static private String getArgsValue(String arg) {
if( arg == null ) {
return null;
}
int pos = arg.indexOf('=');
if( pos == (arg.length() - 1) || pos == -1) {
return "";
}
else {
String retour = arg.substring(pos+1).trim();
if( retour.matches("\\$\\{.*\\}")) {
if (Messenger.debug_mode)
Messenger.printMsg(Messenger.DEBUG, "ant para not set: " + retour);
return "";
}
else {
return retour;
}
}
}
COM: <s> returns the arg part after the or an empty string </s>
|
funcom_train/46733246 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean applicationPanelExists(IContainer container, ContextReference contextRef) throws Exception {
if (container.getContextRefId() == contextRef.getRefId()) {
return true;
}
for (IContainer childContainer : container.getChildContainers()) {
if (applicationPanelExists(childContainer, contextRef)) {
return true;
}
}
return false;
}
COM: <s> look for a panel with the specified context </s>
|
funcom_train/38528904 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void previousCommand(final int direction) {
if (direction < 0) {
if (lastCmdIndex > 0) {
lastCmdIndex = lastCmdIndex - 1;
}
textIn.setText(cmdStack.get(lastCmdIndex));
} else {
if (lastCmdIndex < cmdStack.size()) {
lastCmdIndex = lastCmdIndex + 1;
if (lastCmdIndex < cmdStack.size()) {
textIn.setText(cmdStack.get(lastCmdIndex));
} else {
textIn.setText("");
}
}
}
}
COM: <s> get a previous command from the command stack </s>
|
funcom_train/38388686 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkRepository() {
IPreferenceStore store = WorkbenchPlugin.getDefault()
.getPreferenceStore();
if ((!store.getBoolean(PenumbraPreferenceConstants.CVS_SET_UP))
|| (!store
.contains(PenumbraPreferenceConstants.PENUMBRA_PREFERENCES_SET))) {
MessageDialog
.openInformation(
getShell(),
"Error",
"Before you can check out a project you need to set up "
+ "the Penumbra preferences correctly. To do so select Window"
+ " > Preferences > Penumbra > Checkout/Submit. Type in your"
+ " user name and click 'OK' !");
return;
}
}
COM: <s> checks to see if the cvs repositry for the checkout submit plugin has </s>
|
funcom_train/5725684 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateDepartmentIndexOnStatusChange(Long departmentId, boolean status) {
logger.debug("Starting method updateDepartmentIndexOnStatusChange");
try {
department = departmentDao.load(departmentId);
if (department.isEnabled()) {
logger.debug("method updateDepartmentIndexOnStatusChange: updateIndex");
indexerService.updateIndex(department);
} else {
logger.debug("method updateDepartmentIndexOnStatusChange: deleteIndex");
deleteDepartmentFromIndexCascade(department);
}
} catch (IndexerApplicationException e) {
logger.error(e);
}
}
COM: <s> updates department index entry when the activation status is changed </s>
|
funcom_train/9385541 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeUserConfiguration(LayoutDevice device, String configName) {
// check that the device does belong to the user list.
// the main goal is to make sure that this does not belong to the default/addon list.
if (mUserLayoutDevices.contains(device)) {
device.removeConfig(configName);
}
}
COM: <s> removes a configuration from a given user </s>
|
funcom_train/39024310 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetValues_3args() throws Exception {
System.out.println("setValues");
Object obj = null;
Map<String, Object> writers = null;
Map<String, Object> values = null;
CloneHelper.setValues(obj, writers, values);
// 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 values method of class clone helper </s>
|
funcom_train/38727800 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSelectedRequestListPager() {
String ret = "";
if (selectedRequests.size() > 1) {
ret = MBeanUtils.getMessage("newcmr_pager_label", new Object[] {
Integer.valueOf(actualEditedRequestSeqno + 1),
Integer.valueOf(selectedRequests.size()) });
} else {
ret = "";
}
return ret;
}
COM: <s> pager message request 2 of 5 </s>
|
funcom_train/9579901 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInitDefaultPropertiesWithoutInitParameter() {
// Prepare servletContext without InitParameter.
final MockServletContext servletContext = new MockServletContext();
assertEquals(DEFAULT_CONNECTOR_COUNT, Settings4j.getConnectors().size());
// start test one time: initDefaultProperties from ServletContext initParameter
new DefaultPropertiesLoader().initDefaultProperties(servletContext);
// validate Result (no connector should be added)
assertEquals(DEFAULT_CONNECTOR_COUNT, Settings4j.getConnectors().size());
}
COM: <s> check if the call without init parameter doesnt add a connector </s>
|
funcom_train/35848519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPropertySet() {
Model.getPump().addModelEventListener(listener,
elem,
new String[] {
"isAbstract",
});
Model.getCoreHelper().setAbstract(elem, true);
Model.getPump().flushModelEvents();
assertTrue(eventcalled);
}
COM: <s> tests if a listener that registered for a property set event really </s>
|
funcom_train/45256176 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String calcText(int index, EditorHistoryItem item) {
// IMPORTANT: avoid accessing the item's input since
// this can require activating plugins.
// Instead, ask the item for the info, which can
// consult its memento if it is not restored yet.
return calcText(index, item.getName(), item.getToolTipText(), Window
.getDefaultOrientation() == SWT.RIGHT_TO_LEFT);
}
COM: <s> returns the text for a history item </s>
|
funcom_train/22024218 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector3 getLinearDistance(Vector3 passback) {
getAnchor1InGlobalCoords(g1); //anchor positions in global coordinates
getAnchor2InGlobalCoords(g2);
//work out error by comparing the anchors in global coords
c.sub(g2);
c.set(g1);
//covert into frame 2
convertGlobalFrameToFrame2(c, passback);
return passback;
}
COM: <s> looks at each linear dimention and measures the distance between the two anchors </s>
|
funcom_train/35281918 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void assignAxis(String positiveMapping, String negativeMapping, int axisId){
inputManager.addMapping(positiveMapping, new JoyAxisTrigger(joyId, axisId, false));
inputManager.addMapping(negativeMapping, new JoyAxisTrigger(joyId, axisId, true));
}
COM: <s> assign the mappings to receive events from the given joystick axis </s>
|
funcom_train/38158897 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DTLObject toFullDTLObject() {
DTLObject dobj = this.toDTLObject();
// add Part Instances to DTL
Enumeration enumeration = this.getPartInstanceVector().elements();
while (enumeration.hasMoreElements()) {
AssignmentPartInstance partInstance = (AssignmentPartInstance) enumeration.nextElement();
dobj.addDTLObjectToArray("ASSIGNMENTPARTINSTANCE",
partInstance.toFullDTLObject());
}
return dobj;
}
COM: <s> assignment dtlobject including all parts questions answers </s>
|
funcom_train/38330582 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getAlphaMemory(Object key) {
if (this.alphaMemories.containsKey(key)) {
return this.alphaMemories.get(key);
} else {
// for now return null, it should create a new memory
// and return it.
String mname = "alphamem" + ((BaseNode) key).nodeID;
AlphaMemoryImpl alpha = new AlphaMemoryImpl(mname);
this.alphaMemories.put(key, alpha);
return alpha;
}
}
COM: <s> the implementation will lookup the alpha memory </s>
|
funcom_train/45143500 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testExtendsExceptions() {
CompilerDef baseCompiler = new CompilerDef();
baseCompiler.setExceptions(true);
CompilerDef extendedCompiler = (CompilerDef) createExtendedProcessorDef(
baseCompiler);
setCompilerName(extendedCompiler, "msvc");
String[] preArgs = getPreArguments(extendedCompiler);
assertEquals("/EHsc", preArgs[2]);
}
COM: <s> tests that the extend attribute of the base compiler definition is </s>
|
funcom_train/48906105 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean updateMarket(long rowId, String name, String body) {
ContentValues args = new ContentValues();
args.put(KEY_NAME, name);
args.put(KEY_DESCRIPTION, body);
return mDb.update(DATABASE_TABLE, args, KEY_ROWID + "=" + rowId, null) > 0;
}
COM: <s> update the note using the details provided </s>
|
funcom_train/14370502 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUp() throws Exception {
try {
testUser = TestUtils.setupUser("permsTestUser");
testWeblog = TestUtils.setupWeblog("permsTestWeblog", testUser);
TestUtils.endSession(true);
} catch (Exception ex) {
log.error(ex);
throw new Exception("Test setup failed", ex);
}
}
COM: <s> all tests in this suite require a user and a weblog </s>
|
funcom_train/8436966 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetQueryWithTerms() {
System.out.println("getQueryWithTerms");
String term1 = "term1";
String term2 = "term2";
Pattern instance = new Pattern("1 * hi 2");
String expResult = "term1 hi term2";
String result = instance.getQueryWithTerms(term1, term2);
assertEquals(expResult, result);
}
COM: <s> test of get query with terms method of class nii </s>
|
funcom_train/18544038 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getTitleFromBundle(String header){
String response = header;
try {
String message = RequestUtils.message(pageContext, null, Globals.LOCALE_KEY, header, null);
if (message != null) {
response = message;
}
if (message.indexOf("???")>-1) {
response = header;
}
} catch (JspException e) {
response = header;
}
return response;
}
COM: <s> try to get the title from the struts default resource bundle </s>
|
funcom_train/25434909 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void readGIFFile() throws IOException {
FarbenRAF raf;
try {
raf = new FarbenRAF(this, "r");
} catch (Exception err) {
throw new IOException("Error creating RAF object");
}
try {
gifChunk = new GIFFileChunk(this, 0, this.length(), raf);
} catch (IOException err) {
raf.close();
throw err;
}
raf.close();
}
COM: <s> read and parse the gif file </s>
|
funcom_train/5459676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setToolbarListeners(JButton connect, JButton disconnect) {
connect.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
connectActionPerformed(e);
}
});
disconnect.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
disconnectActionPerformed(e);
}
});
}
COM: <s> sets the action listeners for all of the items on the toolbar </s>
|
funcom_train/39176691 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MessageProducer getNonPersistentJMSProducer() throws JMSException {
if(nonPersistentJmsProducer.get() == null) {
Session session = getJMSSession();
log.debug("Creating JMS message producer");
MessageProducer p = session.createProducer(getQueue());
p.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
nonPersistentJmsProducer.set(p);
}
return nonPersistentJmsProducer.get();
}
COM: <s> returns the current jms non persistent message producer creating </s>
|
funcom_train/8487114 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLibertesPion() {
System.out.println("libertesPion");
int ligne = 0;
int col = 0;
Goban instance = new Goban();
int expResult = 2;
int result = instance.nbLibertes(new Stone(StoneVal.WHITE, ligne, col));
assertEquals(expResult, result);
}
COM: <s> test of nb libertes method of class goban </s>
|
funcom_train/876718 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public XRD execute(Store store, XRD xrd, XRISegment segment, Authority parentAuthority, String subSegmentName, Authority authority, boolean isCreate) throws StageException {
for (Stage stage : this.stages) {
xrd = stage.execute(store, xrd, segment, parentAuthority, subSegmentName, authority, isCreate);
if (xrd == null) return(null);
}
return(xrd);
}
COM: <s> a pipeline is executed by consecutively executing all its stages </s>
|
funcom_train/1432972 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object remove(Object key, Object value) {
Collection valuesForKey = getCollection(key);
if (valuesForKey == null) {
return null;
}
boolean removed = valuesForKey.remove(value);
if (removed == false) {
return null;
}
if (valuesForKey.isEmpty()) {
remove(key);
}
return value;
}
COM: <s> removes a specific value from map </s>
|
funcom_train/36959346 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IRubyFoldingStructureProvider getCurrentFoldingProvider() {
String id = RubyPlugin.getDefault().getPreferenceStore().getString(
PreferenceConstants.EDITOR_FOLDING_PROVIDER);
RubyFoldingStructureProviderDescriptor desc = getFoldingProviderDescriptor(id);
if (desc != null) {
try {
return desc.createProvider();
} catch (CoreException e) {
RubyPlugin.log(e);
}
}
return null;
}
COM: <s> instantiates and returns the provider that is currently configured in the </s>
|
funcom_train/5016467 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String dtdElementPrimaryKey() {
return "<!ELEMENT " + XMLBuilder.NODE_PRIMARYKEY + " (" +
XMLBuilder.NODE_REFCOLUMN + "+)>" + Config.LS +
"<!ATTLIST " + XMLBuilder.NODE_PRIMARYKEY + " " +
XMLBuilder.NODE_PRIMARYKEY_ATTR_NAME + " CDATA #REQUIRED>";
}
COM: <s> write element primary key </s>
|
funcom_train/42272923 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run(){
Integer fin_nr = 0;
Integer err_nr = 0;
while(fin_nr< catalog.taskStatus.size()){
fin_nr = catalog.nrOfFinishedJobs();
err_nr = catalog.nrOfErrorJobs();
//catalog.printCatalog();
try{
sleep(20);
}
catch(InterruptedException e) {
System.out.println("Sleeping error!:)");
}
if(err_nr > 0){
// aici se apeleaza procedura de replanificare
rescheduling();
}
}
System.out.println("Stop monitoring the task graph!!!");
this.stop();
}
COM: <s> the run method </s>
|
funcom_train/9702985 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getInformixHost(String connectionURL) {
String part = connectionURL.substring("jdbc:informix-sqli://".length()); //$NON-NLS-1$
if (part.indexOf(":")>0){ //$NON-NLS-1$
return part.substring(0,part.indexOf(":")); //$NON-NLS-1$
} else {
return part.substring(0,part.indexOf("/")); //$NON-NLS-1$
}
}
COM: <s> retrieve the host from the connection string for a informix </s>
|
funcom_train/4757040 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Node getNotLarger(final T reference) {
Node candidate = null;
for (Node node = top; node != null;) {
if (node.element.compareTo(reference) > 0) {
if (node.left == null) {
return candidate;
}
node = node.left;
} else {
candidate = node;
if (node.right == null) {
return candidate;
}
node = node.right;
}
}
return null;
}
COM: <s> get the node whose element is not larger than the reference object </s>
|
funcom_train/7335434 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void appendForm(StringBuffer html, Template selTemplate, String formName, String paramName) {
html.append("<!-- template selector -->\n");
html.append("<form id='" + formName + "' action='?' method='get'>\n");
appendInlineHtml(html, selTemplate, formName, paramName, null);
html.append("</form>\n\n");
}
COM: <s> append form html </s>
|
funcom_train/29837252 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Dimension minimumFrameSize() {
JInternalFrame[] frames = desktop.getAllFrames();
Dimension result = desktop.getSize();
for (int i = 0; i < frames.length; i++) {
Dimension minSize = frames[i].getMinimumSize();
result.width = Math.min(result.width, minSize.width);
result.height = Math.min(result.height, minSize.height);
}
return result;
}
COM: <s> calculate the smallest minimum size of all frames </s>
|
funcom_train/25142832 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBug21814() throws Exception {
try {
this.rs = this.stmt.executeQuery("SELECT '25:01'");
this.rs.next();
this.rs.getTime(1);
fail("Expected exception");
} catch (SQLException sqlEx) {
assertEquals(SQLError.SQL_STATE_ILLEGAL_ARGUMENT,
sqlEx.getSQLState());
}
try {
this.rs = this.stmt.executeQuery("SELECT '23:92'");
this.rs.next();
this.rs.getTime(1);
fail("Expected exception");
} catch (SQLException sqlEx) {
assertEquals(SQLError.SQL_STATE_ILLEGAL_ARGUMENT,
sqlEx.getSQLState());
}
}
COM: <s> tests fix for bug 21814 time values outside valid range silently wrap </s>
|
funcom_train/37573857 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toUsername(String username, Integer user) {
// Poolman returns -1 for null
if (Utils.POOLMAN_NULL.equals(user)) user = Utils.INTEGER_ZERO;
if (!Utils.blank(username)) return (username);
if (Utils.blank(user)) return Utils.FIELD_BLANK;
return user.toString();
}
COM: <s> return the username or user number </s>
|
funcom_train/48073195 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IndexedProperty indexed(String propPath) throws IllegalArgumentException {
IPropertyBinding prop = getPropertyBinding(propPath);
if(prop == null) return null;
if(prop.getType() != PropertyType.INDEXED) {
throw new IllegalArgumentException("Property '" + propPath + "' does not map to an indexed property");
}
return (IndexedProperty) prop;
}
COM: <s> retrieves an indexed property value from the model given a property path </s>
|
funcom_train/25747863 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private NodeList getListOfElementsToMatch(Document doc) {
XPathFactory xpf = XPathFactory.newInstance();
XPath xpath = xpf.newXPath();
xpath.setNamespaceContext(Utils.getTEINamespaceContext());
try {
XPathExpression xpexp = xpath.compile("//attribute::tc:cid/..");
return (NodeList) xpexp.evaluate(doc, XPathConstants.NODESET);
} catch (XPathExpressionException e) {
e.printStackTrace();
}
return null;
}
COM: <s> produces a list of elements that can be matched </s>
|
funcom_train/18551033 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testClassDataExtractor_resolvePackageNameFN() {
ClassDataExtractor classDataExtractor = new ClassDataExtractor();
Object obj = null;
try {
obj =
PrivateAccessor.invoke(
classDataExtractor,
"resolvePackageName",
new Class[] { String.class },
new Object[] { testpackage });
} catch (Throwable e) {
fail();
}
assertEquals(obj, returnedPackage);
}
COM: <s> tests the resolve package name method functionality </s>
|
funcom_train/26230651 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void jToggleButtonSlChoose_actionPerformed(ActionEvent e) {
if(jToggleButtonSlChoose.isSelected()) {
if(reconImage != null)
reconImage.setCursor(new Cursor(Cursor.HAND_CURSOR));
clearSliceLocation();
} else {
if(reconImage != null)
reconImage.setCursor(new Cursor(Cursor.CROSSHAIR_CURSOR));
}
}
COM: <s> responds to the slice location button being toggled on or off </s>
|
funcom_train/26485032 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeXML(XMLWriter out) {
out.startElement("line");
out.attr("thickness", thickness);
if (color != null && !color.equals(DEFAULT_COLOR))
out.attr("color", color);
if (!visible)
out.attr("visible", visible);
points[0].writeXML(out);
points[1].writeXML(out);
out.endElement();
}
COM: <s> writes this line as an xml tag </s>
|
funcom_train/26172373 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TokenList ( String[] names, int[] tokens, int dflt ) {
_dflt = dflt;
_map = new HashMap( names.length );
for ( int i = 0; i < names.length; i++ )
_map.put( names[ i ], new Integer( tokens[ i ] ) );
}
COM: <s> construct a token list with a default </s>
|
funcom_train/45256364 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IViewDescriptor find(String id) {
Iterator itr = views.iterator();
while (itr.hasNext()) {
IViewDescriptor desc = (IViewDescriptor) itr.next();
if (id.equals(desc.getId())) {
if (WorkbenchActivityHelper.restrictUseOf(desc)) {
return null;
}
return desc;
}
}
return null;
}
COM: <s> find a descriptor in the registry </s>
|
funcom_train/25186788 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void copyPath(Path from) {
for (int i = 0; i < from._path.size(); i++) {
_path.add(from._path.get(i));
}
_depth += from.getDepth(false);
_idepth += from.getDepth(true);
}
COM: <s> copies clones path from from by adding it to current path </s>
|
funcom_train/10482489 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void appendNot(NotTerm term, String charset) throws MessagingException {
// we're goint to generate this with parenthetical search keys, even if it is just a simple term.
appendAtom("NOT");
startList();
// generated the NOT expression
appendSearchTerm(term.getTerm(), charset);
// and the closing parens
endList();
}
COM: <s> append imap search term information from a not term item </s>
|
funcom_train/21059209 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireInsertUpdate(DocumentEvent evt) {
DocumentEvent.ElementChange ch = evt.getChange(getDefaultRootElement());
if (ch != null) {
insertLines(ch.getIndex() + 1, ch.getChildrenAdded().length - ch.getChildrenRemoved().length);
}
super.fireInsertUpdate(evt);
}
COM: <s> we overwrite this method to update the token marker </s>
|
funcom_train/18784999 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toWiki(IHTMLToWiki converter) {
HtmlCleaner cleaner = null;
StringBuilder resultBuffer = new StringBuilder(fInputHTML.length());
try {
cleaner = new HtmlCleaner(fInputHTML);
cleaner.clean();
// resultBuffer.append(cleaner.getXmlAsString());
TagNode body = cleaner.getBodyNode();
converter.nodeToWiki(body, resultBuffer);
} catch (IOException e) {
}
return resultBuffer.toString();
}
COM: <s> converts a given html string into a wiki text string </s>
|
funcom_train/41579844 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long updatePartTile(String id, String name, String text, String category, String type) {
ContentValues values = new ContentValues();
values.put(TILE_KEY_TITLE, name);
values.put(TILE_KEY_TEXT, text);
values.put(TILE_KEY_CATEGORY, category);
values.put(TILE_KEY_TYPE, type);
return mDb.update(TILE_TABLE, values, TILE_KEY_ID + "=\'" + id + "\'", null);
}
COM: <s> updates part of a tile </s>
|
funcom_train/19267816 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void configureProject(String filename) throws BuildException {
logBuffer = new StringBuffer();
fullLogBuffer = new StringBuffer();
project = new Project();
project.init();
project.setUserProperty( "ant.file" , new File(filename).getAbsolutePath() );
project.addBuildListener(new AntTestListener());
ProjectHelper.configureProject(project, new File(filename));
}
COM: <s> set up to run the named project </s>
|
funcom_train/44147358 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RemoteContainer login(LoginContainer cont) throws RemoteException ,SecurityException {
//do some actual athentication here
if(!isAuthenticated(cont.username,cont.password))
throw new SecurityException(AUTH_WARNING);
//new remote object
FisRemote remote = new FisRemoteImpl();
cont.remote = remote;
//when client is authenticated hash it's info
connectedClients.put(""+cont.id,cont);
// Return a reference to a proxy object that encapsulates the access
// to the server, for this client
return new RemoteContainer(remote,new FisRemoteBrowserImpl(),cont.id);
}
COM: <s> allows a client to login and get an interface to the server </s>
|
funcom_train/46428007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String makeVarName(int size, Variable v) {
StringBuffer s = new StringBuffer();
Variable.VarType type = v.getType();
if (type == Variable.VarType.QUERY) {
s.append(Symbols.QUERY_VARIABLE_TAG);
} else {
s.append(Symbols.VARIABLE_TAG);
}
s.append(size + 1);
return s.toString();
}
COM: <s> sequentially generate new variable names </s>
|
funcom_train/41417137 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fillList(final String[] s) {
this.list.deleteAll();
if (s == null || s.length == 0) {
this.list.append("No servers!", null);
} else {
for (int i = 0; i < s.length; i++) {
this.list.append(s[i], null);
}
}
}
COM: <s> helper method to fill list </s>
|
funcom_train/43417509 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected short getSignedValue(final int operandNum) {
/*
// I am not sure if this is ever applicable....
if (operands[operandNum].getType() == OperandType.SMALL_CONSTANT) {
return MemoryUtil.unsignedToSigned8(getUnsignedValue(operandNum));
}*/
return MemoryUtil.unsignedToSigned16(getUnsignedValue(operandNum));
}
COM: <s> converts the specified value into a signed value depending on the </s>
|
funcom_train/38413921 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public int getInterfaceNumber() {
try{
Enumeration e = NetworkInterface.getNetworkInterfaces();
int nb=0;
while( e.hasMoreElements() ) {
e.nextElement();
nb++;
}
return nb;
}catch(Throwable se) {
Debug.signal(Debug.ERROR, null, ""+se );
return 0;
}
}
COM: <s> we return the number of network interfaces of this machine </s>
|
funcom_train/21272619 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Dialog newViewDialog(String message, View v) {
mBuilder.setMessage(message);
Dialog d = mBuilder.create();
d.addContentView(v, new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT,
LayoutParams.WRAP_CONTENT));
return d;
}
COM: <s> create a new dialog the the specified view and message </s>
|
funcom_train/2886640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendConfiguredMessage() throws SmartFrogException, RemoteException {
if(attachmentList == null)
sendEmail(toList ,ccList, from, subject, message);
else {
sendEmailWithAttachments(toList ,ccList, from, subject,
message, attachmentList);
}
}
COM: <s> send the message we are configured to send </s>
|
funcom_train/3704227 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getPrivacyTagSecondUseAllow() {
Tuple tSecondUse = getOrCreatePrivacyTag(TUPLE_PRIVACYTAG_SECOND_USE);
String strVal = tSecondUse.getAttribute(ATTR_ALLOW_SECOND_USE);
if (strVal == null) {
return (false);
}
else {
return ("true".equalsIgnoreCase(strVal));
}
} // of method
COM: <s> get the second use value </s>
|
funcom_train/47138527 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int insert(final Content content) {
Object[] params = new Object[] { new Long(content.getId()), content.getTag(), content.getText(),
content.getBinary(), content.getCreated(), content.getLastChanged() };
return update(params);
}
COM: <s> insert content into database </s>
|
funcom_train/4085767 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Session getOrCreateSession(String sessionId) {
Session session = null;
try {
session = ofy().get( Session.class, sessionId );
}
catch( NotFoundException e ) {
session = createInvalidSession( sessionId );
}
assert session != null : "Session not found, and unable to create it!";
return session;
}
COM: <s> gets the session from the datastore cache </s>
|
funcom_train/31825543 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int queryStatus(int cmd) {
if (objIOleCommandTarget == null) {
int[] address = new int[1];
if (objIUnknown.QueryInterface(COM.IIDIOleCommandTarget, address) != COM.S_OK)
return 0;
objIOleCommandTarget = new IOleCommandTarget(address[0]);
}
OLECMD olecmd = new OLECMD();
olecmd.cmdID = cmd;
int result = objIOleCommandTarget.QueryStatus(null, 1, olecmd, null);
if (result != COM.S_OK) return 0;
return olecmd.cmdf;
}
COM: <s> returns the status of the specified command </s>
|
funcom_train/3556128 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSource(TokenizerSource source) {
_source = source;
_eofReached = false;
_currentReadPos = 0;
_currentWritePos = 0;
if (isFlagSet(Flags.F_COUNT_LINES)) {
_lineNumber = 0;
_columnNumber = 0;
} else {
_lineNumber = -1;
_columnNumber = -1;
}
Arrays.fill(_scannedToken, null);
}
COM: <s> setting the source of data </s>
|
funcom_train/46192666 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TabletInfo lookupTargetTablet(Row.Key rowKey) throws IOException {
//long startTime = System.currentTimeMillis();
TabletInfo tabletInfo = lookupTargetTablet(conf, tableName, rowKey);
//System.out.println("Total lookupTargetTablet time:" + (System.currentTimeMillis() - startTime));
return tabletInfo;
}
COM: <s> find a tablet serving a specified row and return its information </s>
|
funcom_train/38801722 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isEscapedQuote(final String nextLine, final boolean inQuotes, final int i) {
return inQuotes // we are in quotes, therefore there can be escaped quotes in here.
&& nextLine.length() > (i+1) // there is indeed another character to check.
&& nextLine.charAt(i+1) == quotechar;
}
COM: <s> precondition the current character is a quote or an escape </s>
|
funcom_train/41385512 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBotonBuscar() {
if (botonBuscar == null) {
botonBuscar = new JButton();
botonBuscar.setBounds(new Rectangle(485, 15, 100, 20));
botonBuscar.setText("Buscar");
botonBuscar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
listener.Action(e);
}
});
}
return botonBuscar;
}
COM: <s> this method initializes boton buscar </s>
|
funcom_train/41178990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDestroyBatch_whenPossible() {
System.out.println("Test destroy when there is a batch to destroy :");
StorageWithABatchToDestroy.DiplayAllTheBatchesInAStorage();
StorageWithABatchToDestroy.DestroyBatch();
StorageWithABatchToDestroy.DiplayAllTheBatchesInAStorage();
}
COM: <s> test the method that destroys a batch </s>
|
funcom_train/23825004 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setGraphModel(GraphModel model) {
if(model == null) {
throw new NullPointerException("GraphModel must not be null");
}
Object oldValue = graphModel;
Iterator it = graphModel.getListeners();
//Transfer the listeners.
while(it.hasNext()) {
GraphModelListener lsnr = (GraphModelListener) it.next();
model.addGraphModelListener(lsnr);
it.remove();
}
graphModel = model;
visualisedObjectManager.setGraphModel(graphModel);
firePropertyChangeEvent(Controller.GRAPH_MODEL_PROPERTY, oldValue, graphModel);
}
COM: <s> sets the code graph model code which is an interface </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.