__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/22960301 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getOutputValue() {
outValue = bias;
for (int i = 0; i < inputs; i++) outValue += a[i] * f[i].getOutputValue();
outValue = 1.0 / (1.0 + Math.exp(-sigmoidSenzitivity * outValue)); //sigmoid
return outValue;
}
COM: <s> nonlinear transfer function of bpneuron </s>
|
funcom_train/32057785 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetLastFound() {
System.out.println("testSetLastFound");
GPGraphpad pad = new GPGraphpad();
GPGraph graph = new GPGraph();
GraphUndoManager undo = new GraphUndoManager();
Object found = new Object();
GPDocument newDoc = new GPDocument(pad, "test", null, graph, null, undo);
try {
newDoc.setLastFound(found);
} catch (Exception e) {
fail();
}
}
COM: <s> test of set last found method of class gpdocument </s>
|
funcom_train/15554803 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SparseMatrix run(SparseMatrix a, double maxResidual, double pGamma, double loopGain, double maxZero) {
// add cycles
addLoops(a, loopGain);
a.normaliseRows();
double residual = 1.;
int i = 0;
// main iteration
while (residual > maxResidual) {
i++;
a = expand(a);
residual = inflate(a, pGamma, maxZero);
}
return a;
}
COM: <s> run the mcl process </s>
|
funcom_train/40477967 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initControls() {
// Handle keyboard input
webGLCanvas.addKeyDownHandler(new KeyDownHandler() {
@Override
public void onKeyDown(KeyDownEvent event) {
if (event.getNativeKeyCode() == KeyCodes.KEY_PAGEUP) {
translateZ += 0.1f;
event.stopPropagation();
event.preventDefault();
}
if (event.getNativeKeyCode() == KeyCodes.KEY_PAGEDOWN) {
translateZ -= 0.1f;
event.stopPropagation();
event.preventDefault();
}
}
});
}
COM: <s> initializes the controls of the example </s>
|
funcom_train/20303707 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run( rdfcat rc ) {
String l = rc.getExpectedInput();
if (m_lang != null) {
// if an input lang was given, use that
rc.expectInput( m_lang );
}
rc.readInput( m_uri );
// put the lang back to default
rc.expectInput( l );
}
COM: <s> perform the action of reading a uri </s>
|
funcom_train/50189167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void atestRunTests8() {
try {
Thread.sleep(5000);
} catch (InterruptedException e) {}
long delta = exampleSAXSourceAndDOMResult();
log.info("1. SAX2DOM Transformation length : " + delta + " ms");
delta = exampleSAXSourceAndDOMResult();
log.info("2. SAX2DOM Transformation length : " + delta + " ms");
}
COM: <s> show the identity transformation with saxsource and domresult </s>
|
funcom_train/50141366 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addReference(String id, Object o){
try {
Context context = new InitialContext(hashtableEnvironment);
context.bind(id, o);
log.debug("Bound object to JNDI '" + id + "'.");
}
catch(javax.naming.NamingException ne) {
log.fatal("Error adding reference.", ne);
}
}
COM: <s> add an object </s>
|
funcom_train/2994050 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean startDrag(boolean active, int x, int y, int w, int h) {
if (!active) {
active = true;
x1 = x;
y1 = y;
boxWidth = w;
boxHeight = h;
Graphics g = getGraphics();
// draws a box with the upper-left corner at x1,y1 and with the
// specified width (to the right) and height (direct to the bottom):
//------------------------------------------------------------------
g.drawRect(x1,y1,boxWidth,boxHeight);
}
else active = false;
return active;
}
COM: <s> picks up a mouse drag event </s>
|
funcom_train/28872886 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addTopologicalOrder(List<DTNode> list, Set<Integer> seen) {
if ( seen.contains(number) ) return;
seen.add(number);
for ( DTNode n : children.values() )
n.addTopologicalOrder(list, seen);
list.add(this);
}
COM: <s> the code add topological order code method recursively adds this node and its </s>
|
funcom_train/461208 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Metadata runSpecific() throws XdsException, LoggerException {
validateParameters();
parseParameters();
if (uids == null && uuids == null && lids == null)
throw new XdsInternalException("GetDocuments Stored Query: Internal Error : GetDocuments.java#runSpecific : uuid not found, uid not found, and lids not found");
return runImplementation();
}
COM: <s> implementation of stored query specific logic including parsing and validating parameters </s>
|
funcom_train/14456852 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("[");
builder.append(Long.toString(from));
builder.append("; ");
builder.append(Long.toString(until));
builder.append("]");
return builder.toString();
}
COM: <s> returns a string representation of the object </s>
|
funcom_train/39167390 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Dimension getPreferredSize() {
//if hard-coded, we return the given value.
if(isPreferredSizeSet()) return super.getPreferredSize();
//the first time the component is sized, calculate the actual preferred size
if(!componentSizedProperly){
calculatePreferredSize();
}
return super.getPreferredSize();
}
COM: <s> overridden so that the preferred size can be calculated properly </s>
|
funcom_train/27909891 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void findDirectories(Vector stack, File file) {
stack.add(file);
File[] contents = file.listFiles(_dirFilter);
if (contents != null && contents.length != 0) {
for (int i = 0; i < contents.length; i++) {
findDirectories(stack, contents[i]);
}
}
}
COM: <s> finds directories contained within the specified location </s>
|
funcom_train/32775954 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveAs(String title) {
try {
BufferedImage image = new BufferedImage(this.getWidth(), this.getHeight(), BufferedImage.TYPE_INT_RGB);
Graphics g = image.getGraphics();
this.paintAll(g);
g.dispose();
ImageIO.write(image, "jpeg", new File(title));
} catch (Exception e) { }
}
COM: <s> saves the chart including title and legend as an image file </s>
|
funcom_train/1242498 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void buildColumnsHeaders() {
for (int i = 0; i < TreeColumnTitles.values().length; i++) {
TreeColumnTitles title = TreeColumnTitles.values()[i];
TreeColumn column = new TreeColumn(tree, SWT.LEFT);
column.setText(title.toString());
addListenerForSortingColumns(column);
if (i > 0) {
column.setMoveable(true);
}
// if(i ==0){
// column.setWidth(120);
// }else if(i == 1){
// column.setWidth(300);
// }else{
// column.setWidth(80);
// }
}
}
COM: <s> builds the column headers for the bug tree viewer </s>
|
funcom_train/25305331 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startCDATA() throws SAXException {
if (getState() == State.DOCUMENTATION) {
pushMixedContentState(MixedContentState.CDATA);
this.currentMixedContentCDataSection = this.mixedContentDocument
.createCDATASection("");
this.currentMixedContentNode
.appendChild(this.currentMixedContentCDataSection);
}
}
COM: <s> receive notification of the beginning of a cdata section </s>
|
funcom_train/17094005 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Pt getEllipticalPoint(double t) {
double x = (a * cos(t));
double y = (b * sin(t));
double xRot = x * cos(ellipseRotation) + y * sin(ellipseRotation);
double yRot = -x * sin(ellipseRotation) + y * cos(ellipseRotation);
return new Pt(xRot + center.x, yRot + center.y);
}
COM: <s> returns a point on the ellipse boundary parameterized by the given radial angle </s>
|
funcom_train/15399346 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save() {
String cc = getChiefComplaint();
DICOMImageSet dis = getDICOMImageSet();
// Save SR first creates list of PS to save.
System.gc();
System.gc();
DICOMStructuredReport sr = StructuredReportUtilities.doSaveSR(_studyDir, cc, dis);
DICOMImagePanelGroup dipg = getDICOMImagePanelGroup();
PresentationStateUtilities.doSavePS(sr.getHashSet(), _studyDir, dipg, dis);
}
COM: <s> saves the current study the image data itself never changes so a </s>
|
funcom_train/12277423 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setDomainGroups(String rdnGroups) throws Exception {
if(!this.rdnGroups.equals(""))
this.rdnGroups.add(rdnGroups.trim());
if (this.rdnGroups.size() == 1 && this.rdnGroups.equals("")) {
throw new IllegalArgumentException("No ldap domain of group configured.");
}
}
COM: <s> set rdn groups </s>
|
funcom_train/32803134 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLog(ILog pluginLog) {
// precondition check
if (pluginLog == null) {
throw new IllegalArgumentException("The parameter 'pluginLog' was null."); //$NON-NLS-1$
}
this.pluginLog = pluginLog;
// get the plugin name
pluginName = pluginLog.getBundle().getSymbolicName();
}
COM: <s> sets the eclipse log instance </s>
|
funcom_train/51752269 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void randomizeColor() {
rr = r.nextInt(rb < 1 ? 100 : rb);
rg = r.nextInt(rr < 1 ? 100 : rr);
rb = r.nextInt(rg < 1 ? 100 : rg);
mapRGB = null; //remove custom color map
}//randomizeColor()
COM: <s> create new random factors for algorithmic color map </s>
|
funcom_train/42385603 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void xtestPrint() {
SingleSheet ss = (SingleSheet)manager.getSheet("o1");
StringWriter sw = new StringWriter();
FilePathListConsumer consumer = new FilePathListConsumer(sw);
consumer.setSheetsDelim('|');
consumer.setIncludeSheets(true);
PathLister.resolveAll(ss, consumer, false);
System.out.println(sw.toString());
}
COM: <s> rename to code test print code if youd like to generate expected </s>
|
funcom_train/37508222 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JTextField getTextThumbHeight() {
if (m_textThumbHeight == null) {
m_textThumbHeight = new JTextField();
m_textThumbHeight.setPreferredSize(new Dimension(50,
m_textThumbHeight.getPreferredSize().height));
}
return m_textThumbHeight;
}
COM: <s> returns the textfield for the thumbnail height </s>
|
funcom_train/22417380 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Method getGetterMethod(Class klass, String property) {
for (Method met : klass.getMethods()) {
String isGetter = "is" + Character.toUpperCase(property.charAt(0))
+ property.substring(1);
String getGetter = "get"
+ Character.toUpperCase(property.charAt(0))
+ property.substring(1);
if (met.getName().equals(isGetter)
|| met.getName().equals(getGetter)) {
return met;
}
}
return null;
}
COM: <s> get a getter method from a specific property name on a class </s>
|
funcom_train/8415095 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean reservationsOverlap(Reservation nr){
long start = 0,stop = Long.MAX_VALUE;
List<ReservationInterface> reservations = task.getReservationList();
reservations.add(nr);
for(ReservationInterface r : reservations){
if(r.getStart().getTime() > start)
start = r.getStart().getTime();
if(r.getEnd().getTime() < stop)
stop = r.getEnd().getTime();
}
if(stop-start < getDuration().getTime())
return false;
return true;
}
COM: <s> check whether reservations overlap at least for the duration of the task </s>
|
funcom_train/34781031 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void center() {
Toolkit tk = Toolkit.getDefaultToolkit();
Dimension screenSize = tk.getScreenSize();
Dimension size = this.getSize();
int x = (screenSize.width - size.width) / 2;
int y = (screenSize.height - size.height) / 2;
this.setLocation(x, y);
}
COM: <s> method to center the window </s>
|
funcom_train/15462299 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void cleanAllStores() {
HashSet temp = null;
synchronized(pidToClean) {
temp = pidToClean;
pidToClean = new HashSet<Pid>();
}
Iterator it = clients.iterator();
while (it.hasNext()) {
try {
MemoryNodeDefinition def = (MemoryNodeDefinition)it.next();
def.getClientStorage().cleanPids(Pid.MAGICPID, temp);
} catch (Exception e) {} //Client may be gone or unreachable
}
}
COM: <s> calls every client to destroy some obsolete objects </s>
|
funcom_train/22277080 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void releaseObjects() {
// archiveData = null;
targetProxyManager = null;
nameToComponent = null;
objectToBounds = null;
rootComponents = null;
components = null;
documentSize = null;
// validArchive = false;
validObjects = false;
// planURL = null;
// versionNumber = CURRENT_VERSION_NUMBER;
// archiveFormat = UNKNOWN_TYPE;
// backgroundColor = Color.lightGray();
}
COM: <s> this is a convience method to release the references we have to the </s>
|
funcom_train/45224500 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Vector popcreateBlankElementUai(Unitaccountsitems rt) {
Vector t = new Vector();
t.addElement(rt.getId());
t.addElement(rt.getItemdate());
t.addElement(rt.getItemamount());
t.addElement(rt.getItemto());
t.addElement(rt.getItemdecription());
t.addElement(rt.getItemchecknumber());
t.addElement(rt.getTransactiontype());
t.addElement(rt.getReconciled());
t.addElement(rt.getVoided());
t.addElement("RECONCILE");
return t;
}
COM: <s> popcreate blank element uai </s>
|
funcom_train/46837273 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JList getJListClass() {
if (jListClass == null) {
jListClass = new JList(model);
jListClass.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
if(jListClass.getSelectedIndex() != -1){
jButtonSave.setEnabled(true);
}
}
});
}
return jListClass;
}
COM: <s> this method initializes j list class </s>
|
funcom_train/33283143 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected SimpleScriptable getScriptableFor(final Object object) {
if (object instanceof WebWindow) {
return (SimpleScriptable) ((WebWindow) object).getScriptObject();
}
final DomNode domNode = (DomNode) object;
final Object scriptObject = domNode.getScriptObject();
if (scriptObject != null) {
return (SimpleScriptable) scriptObject;
}
return makeScriptableFor(domNode);
}
COM: <s> returns the java script object that corresponds to the specified object </s>
|
funcom_train/49101727 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAcscBusData(ShortCircuitBusXmlType acscBusXml, AcscBus acscBus) throws InterpssException {
if (acscBusXml.getScCode() == ShortCircuitBusEnumType.CONTRIBUTING) {
setContributeBusInfo(acscBusXml, acscBus);
} else { // non-contributing
setNonContributeBusFormInfo(acscBus);
}
}
COM: <s> set sc bus info only </s>
|
funcom_train/5088866 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawLine( int x1, int y1, int x2, int y2 ) {
drawList.add( "drawLine(" + x1 + "," + y1 + "," + x2 + "," + y2 + ")" ); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
}
COM: <s> draws a line using the foreground color between the points code x1 code </s>
|
funcom_train/36836466 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ForumPoster doLogin(String email, String password) throws PersistenceLayerException{
ForumPoster user = null;
Map<String, String> loginInfo = new Hashtable<String, String>();
loginInfo.put("email", email);
loginInfo.put("password", password);
user = (ForumPoster)PersistenceBrokerFactory.getInstance().
getPersistenceLayer().find(loginInfo, ForumPoster.class);
return user;
}
COM: <s> makes the login of a user </s>
|
funcom_train/35742694 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Message makeMessage() {
Message msg = new Message();
msg.addMessageElement(PeerView.MESSAGE_NAMESPACE, PeerView.EDGE_ELEMENT);
RdvAdvertisement radv = PeerView.createRdvAdvertisement(group.getPeerAdvertisement(), name);
XMLDocument doc = (XMLDocument) radv.getDocument(MimeMediaType.XMLUTF8);
MessageElement msge = new TextDocumentMessageElement(PeerView.MESSAGE_ELEMENT_NAME, doc, null);
msg.addMessageElement(PeerView.MESSAGE_NAMESPACE, msge);
return msg;
}
COM: <s> make a peer view message </s>
|
funcom_train/44348746 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createUsernameFields(Composite parent) {
new Label(parent, SWT.NONE).setText(Messages.getString("password")); //$NON-NLS-1$
passwordField = new Text(parent, passwordStyle);
GridData data = new GridData(GridData.FILL_HORIZONTAL);
data.horizontalSpan = 2;
data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.ENTRY_FIELD_WIDTH);
passwordField.setLayoutData(data);
passwordField.addListener(SWT.Modify, new Listener() {
public void handleEvent(Event event) {
dialogChanged();
}
});
}
COM: <s> creates the three widgets that represent the user name entry area </s>
|
funcom_train/6289548 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void deleteAllMailsFromDB() {
for (int i = 0; i < getStorage().getSize(); i++) {
MessageHeader message = (MessageHeader) getStorage().getMessageAt( i );
message.deleteFromDBAndBox(Trash.TrashModes.CONDITIONALLY_MOVE_TO_TRASH);
}
}
COM: <s> deletes all mails stored in vector in this box from databases of boxes </s>
|
funcom_train/21460445 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkRandomSymmetric() {
for( int N = 1; N <= 15; N++ ) {
for( int i = 0; i < 20; i++ ) {
DenseMatrix64F A = RandomMatrices.createSymmetric(N,-1,1,rand);
EigenDecomposition alg = createDecomposition();
assertTrue(safeDecomposition(alg,A));
performStandardTests(alg,A,N);
}
}
}
COM: <s> check results against symmetric matrices that are randomly generated </s>
|
funcom_train/35185911 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void draw(Shape shape, Stroke stroke, Color color, Paint paint) {
synchronized (JPAZUtilities.getJPAZLock()) {
Graphics2D g2 = content.createGraphics();
if (antialiased)
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
// set stroke, color, and paint
g2.setStroke(stroke);
g2.setColor(color);
g2.setPaint(paint);
// draw the shape
if (shape != null)
g2.draw(shape);
invalidate();
}
}
COM: <s> draws the shape to the pane </s>
|
funcom_train/3062451 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addAttributes(final Element element, final Map attributes) {
final List attrs = element.attributes();
for (int i = 0; i < attrs.size(); i++) {
final Attribute attribute = (Attribute) attrs.get(i);
attributes.put(attribute.getName(), attribute.getValue());
}
}
COM: <s> adds the attributes of an element to the given map </s>
|
funcom_train/944845 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void redraw(Region invalidRgn) throws QTException {
super.redraw(invalidRgn);
// this redraw should be done in another thread to free up the display thread
// so that the app is more repsonsive for the user
// see the sample code
if (ip.isRedrawing() && canv != null) {
ip.redraw(invalidRgn);
}
}
COM: <s> qtcanvas calls this method when the client should redraw itself </s>
|
funcom_train/21996049 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int fetchKeyCount(User user, HttpServletRequest req) throws JRecException {
try {
Sites site_rpc = RpcFactory.newSites(user);
return site_rpc.getKeyCount();
}
catch (RpcException e) {
throw new JRecException("rpc-problem fetching site rec count", e);
}
}
COM: <s> return an approximate count of recs for the current filter </s>
|
funcom_train/29615029 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BaseBean createElementBean(IElement element) throws BeanException {
BaseBean elementBean = createBean(element);
try {
BeanUtils.copyProperties(elementBean, element);
} catch (Exception e) {
throw new BeanException("Could not build bean " + e.toString(), e);
}
if (elementBean instanceof TemplateBean)
((TemplateBean) elementBean).initName();
return elementBean;
}
COM: <s> create a new code product bean code based on the code product code </s>
|
funcom_train/18788058 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private VisibilityCode convert(MVisibilityKind visibilityKind) {
VisibilityCode visibility = VisibilityCode
.getCode(VisibilityCode.PUBLIC_ID);
if (MVisibilityKind.PUBLIC.equals(visibilityKind)) {
visibility = VisibilityCode.getCode(VisibilityCode.PUBLIC_ID);
} else if (MVisibilityKind.PROTECTED.equals(visibilityKind)) {
visibility = VisibilityCode.getCode(VisibilityCode.PROTECTED_ID);
} else if (MVisibilityKind.PRIVATE.equals(visibilityKind)) {
visibility = VisibilityCode.getCode(VisibilityCode.PRIVATE_ID);
}
return visibility;
}
COM: <s> converts a nsuml visibility into a mda visibility </s>
|
funcom_train/25966243 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GlobalizationPreferences setDateFormat(int dateStyle, int timeStyle, DateFormat format) {
if (isFrozen()) {
throw new UnsupportedOperationException("Attempt to modify immutable object");
}
if (dateFormats == null) {
dateFormats = new DateFormat[DF_LIMIT][DF_LIMIT];
}
dateFormats[dateStyle][timeStyle] = (DateFormat) format.clone(); // for safety
return this;
}
COM: <s> set an explicit date format </s>
|
funcom_train/18726793 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void eraseZoomWindow() {
final int width = zoomWindowSize.width;
final int height = zoomWindowSize.height;
final int x = zoomWindowLocation.x;
final int y = zoomWindowLocation.y;
JaxoUtils.drawImageArea(background, x, y, width, height, graphics);
}
COM: <s> erases the zoom window </s>
|
funcom_train/22050556 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getDBBooleanAttribute(int iIndex) {
switch (iIndex) {
case 9:
return isDisplay(); // Display or not
case 10:
return isInGame(); // In game or not
case 15:
return fDeleted; // fDeleted
}
// Otherwise ask the subclass.
return getDBExtraBooleanAttribute(iIndex - ATTRIBUTES_IN_BASE_CLASS);
}
COM: <s> get an attribute by index boolean </s>
|
funcom_train/23411592 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDataTypePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DataRangeAtom_dataType_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_DataRangeAtom_dataType_feature", "_UI_DataRangeAtom_type"),
SwrlPackage.Literals.DATA_RANGE_ATOM__DATA_TYPE,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the data type feature </s>
|
funcom_train/7494485 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String validateFallbackLocale() {
ULocale loc = ULocale.getDefault();
if (loc != fallbackLocale) {
synchronized (this) {
if (loc != fallbackLocale) {
fallbackLocale = loc;
fallbackLocaleName = loc.getBaseName();
clearServiceCache();
}
}
}
return fallbackLocaleName;
}
COM: <s> return the name of the current fallback locale </s>
|
funcom_train/41208754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelectedIndex(int index, boolean scrollToSelection) {
if (index < 0) {
throw new IllegalArgumentException("Selection index is negative:" + index);
}
model.setSelectedIndex(index);
if (scrollToSelection && isInitialized()) {
selectElement(index);
}
}
COM: <s> sets the current selected offset in the list </s>
|
funcom_train/29706219 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void studyBox(int box_p) {
// Loop on values
for(int value = 0; value<_template.maxValue; value++) {
// Scan for a single line
if(scanOnLine(box_p, value)) {
break;
}
// Scan on columns !
if(scanOnColumn(box_p, value)) {
break;
}
}
}
COM: <s> study a single box </s>
|
funcom_train/34562485 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void readJFIF(final int size) throws IOException {
bfc.buffer(16); // standard JFIF segment has 16 bytes
final long pos = bfc.position();
if(!checkNextBytes(HEADER_JFIF)) {
bfc.position(pos);
readJFXX(size);
return;
}
final int s = size - HEADER_JFIF.length;
bfc.skip(s);
}
COM: <s> reads a jfif jpeg file interchange format segment </s>
|
funcom_train/43687787 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Map getUrgentResultByIds(Integer caseId, Integer countyId, Integer groupId) {
Map contentMap = Collections.EMPTY_MAP;
UrgentResult urgentResult = getUrgentResult(caseId, countyId, groupId);
if (urgentResult != null) {
String contentJson = "{" + urgentResult.getContent() + "}";
//logger.info("json字符串:{}", contentJson);
contentMap = convertJsonToMap(contentJson);
}
return contentMap;
}
COM: <s> id id id </s>
|
funcom_train/8090932 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double areaUnderROC(int classIndex) {
// Check if any predictions have been collected
if (m_Predictions == null) {
return Instance.missingValue();
} else {
ThresholdCurve tc = new ThresholdCurve();
Instances result = tc.getCurve(m_Predictions, classIndex);
return ThresholdCurve.getROCArea(result);
}
}
COM: <s> returns the area under roc for those predictions that have been collected </s>
|
funcom_train/48189990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PosStampTemplate update(PosStampTemplate entity) {
LogUtil.log("updating PosStampTemplate instance", Level.INFO, null);
try {
PosStampTemplate result = entityManager.merge(entity);
LogUtil.log("update successful", Level.INFO, null);
return result;
} catch (RuntimeException re) {
LogUtil.log("update failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> persist a previously saved pos stamp template entity and return it or a </s>
|
funcom_train/1385858 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtnConfigAppl() {
if (btnConfigAppl == null) {
try {
btnConfigAppl = new JButton();
btnConfigAppl.setPreferredSize(new Dimension(120, 70)); // Generated
btnConfigAppl.setText("<html><center>Configurazione<br>Applicazione</html>"); // Generated
} catch (java.lang.Throwable e) {
// TODO: Something
}
}
return btnConfigAppl;
}
COM: <s> this method initializes btn config appl </s>
|
funcom_train/9684003 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getCheckedNonJavaOccurrences() {
List occurrences = new ArrayList();
for (Iterator iter = nonJavaNodes.iterator(); iter.hasNext(); ) {
NonJavaTreeTableNode n = (NonJavaTreeTableNode) iter.next();
if (n.isCheckBoxNeeded() && n.isSelected()) {
occurrences.add(n.getBin());
}
}
return occurrences;
}
COM: <s> finds all non java occurrences that are checked in the tree </s>
|
funcom_train/45803794 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void renderBackButton(Writer out, int topline) throws IOException {
out.write("<a href=\"" + staticurl + (topline - windowSize) +
"\" title='Show previous page'><img border=0 src=" + imageurl +
"nav_prev.gif></a> ");
}
COM: <s> experimental renders the back button at the top bottom of the form </s>
|
funcom_train/51556646 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean endsWith(String input, String substring) {
if (input == null) input = "";
if (substring == null) substring = "";
int index = input.lastIndexOf(substring);
if (index == -1) return false;
if (index == 0 && substring.length() == 0) return true;
return (index == input.length() - substring.length());
}
COM: <s> tests if an input string ends with the specified suffix </s>
|
funcom_train/45317580 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendConflict(String text) {
Logger.getLogger(Logger.GLOBAL_LOGGER_NAME).info("Conflict " + text);
AACCNormalResponse response = new AACCNormalResponse();
response.setCode(AACCNormalResponse.MSG_CONFLICT);
response.setMessage(text);
sendMessage(response);
}
COM: <s> sends text to the client with response code 409 </s>
|
funcom_train/34320900 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPersistentName(String tyRuBaName) {
String result = (String) nameMap.get(tyRuBaName);
if (result == null) {
int nextNum = nameMap.size();
result = String.valueOf(nextNum);
nameMap.put(tyRuBaName, result);
}
return result;
}
COM: <s> gets a filename from a given java string </s>
|
funcom_train/20897777 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer sbuf = new StringBuffer(toStringBrief());
sbuf.append("\nClusters: ");
for (Iterator i = clusters.iterator(); i.hasNext();) {
sbuf.append("\n ").append(i.next());
}
return sbuf.toString();
}
COM: <s> the code to string code method returns the full description of the collection </s>
|
funcom_train/46848808 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Group makeGroup(Composite parent, int style, String text) {
Group group = new Group(parent, style);
group.setText(text);
group.setLayout(new GridLayout());
group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
return group;
}
COM: <s> a shortcut function that generates a swt </s>
|
funcom_train/43430075 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setSuggestion() {
if ( pBoard.getStatus() < FREE &&
falseMove<5 &&
suggLength==0 &&
playerType[spieler]==0) {
pBoard.setSuggestions();
} else {
if ( pBoard.getStatus() == FREE && playerType[spieler]==0) {
pBoard.setSuggestions();
} else {
wrongInput( ERRSUGGONLYHUMAN+ERRSUGGON);
}
}
}
COM: <s> sets a suggestion for a human player </s>
|
funcom_train/31931188 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean hasChanges() {
boolean hasChanges = false;
if (currentEditor() != null) {
Iterator<AbstractEditor> it = openEditors().iterator();
while (!hasChanges && it.hasNext()) {
hasChanges = it.next().hasChanges();
}
}
return hasChanges;
}
COM: <s> return code true code if any open editor has unsaved changes </s>
|
funcom_train/29516549 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Result runTest(String qualifiedTestMethod) {
Class<?> jUnitTestClass = getClass(qualifiedTestMethod);
String testMethodName = getMethodName(qualifiedTestMethod);
Request testRunRequest = Request.method(jUnitTestClass, testMethodName);
JUnitCore jUnitCore = new JUnitCore();
return jUnitCore.run(testRunRequest);
}
COM: <s> run the provided test method using a junit request passed to junit core </s>
|
funcom_train/38495681 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkNonFixedOptionality(Attribute attr, String expectedOptionality) {
if(expectedOptionality.equals(Attribute.OPTIONALITY_STR_REQUIRED)) {
Assert.assertEquals(AttDef.OPTIONALITY_REQUIRED, attr.getOptionality());
} else {
Assert.assertEquals(AttDef.OPTIONALITY_IMPLIED, attr.getOptionality());
}
Assert.assertEquals(expectedOptionality, attr.getOptionalityString());
}
COM: <s> helper function to compare the optionality of the </s>
|
funcom_train/9140243 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initialise(double[] scs) {
resultSet.initialise(scs);
RETRIEVED_SET_SIZE = Integer.parseInt(ApplicationSetup.getProperty("matching.retrieved_set_size", "1000"));
FREQUENCY_UPPER_THRESHOLD = Integer.parseInt(ApplicationSetup.getProperty("frequency.upper.threshold", "0"));
IGNORE_LOW_IDF_TERMS = Boolean.parseBoolean(ApplicationSetup.getProperty("ignore.low.idf.terms","true"));
MATCH_EMPTY_QUERY = Boolean.parseBoolean(ApplicationSetup.getProperty("match.empty.query","false"));
}
COM: <s> initialises the arrays prior of retrieval with </s>
|
funcom_train/35683392 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDefaultJ2eeLocation() {
String value = System.getenv("CATALINA_BASE");
if (value == null) {
value = System.getenv("CATALINA_HOME");
if (value == null) {
value = System.getenv("JETTY_HOME");
if (value == null) {
return "";
}
}
}
return value;
}
COM: <s> if tomcat or jetty are installed on this machine this will retrieve the </s>
|
funcom_train/16371147 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("RemoteUserManager".equals(portName)) {
setRemoteUserManagerEndpointAddress(address);
}
else
{ // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
COM: <s> set the endpoint address for the specified port name </s>
|
funcom_train/36429342 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createNoDbSpecialId() {
synchronized (clientNoDbSpecialIdLast) {
// New SpecialId is not possible with No Database Model
specialId = System.currentTimeMillis();
if (clientNoDbSpecialIdLast.get() >= specialId) {
specialId = clientNoDbSpecialIdLast.incrementAndGet();
} else {
clientNoDbSpecialIdLast.set(specialId);
}
return;
}
}
COM: <s> create a special id for no db client </s>
|
funcom_train/37649278 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean validateName() {
boolean flValid = true;
String name = nameText.getText();
if (StringUtil.isEmpty(name)) {
MessageDialog.openWarning(getShell(), getMessage(StringKeys.WARNING_TITLE),
getMessage(StringKeys.WARNING_NAME_MANDATORY));
nameText.setFocus();
flValid = false;
}
return flValid;
}
COM: <s> perform the name validation </s>
|
funcom_train/3803565 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void computePeakTangents() {
if (cpPrev != null) {
p3InTangent.interpolate(getPosition(), cpPrev.getPosition(), fInMagnitude / 3f);
}
if (cpNext != null) {
p3OutTangent.interpolate(getPosition(), cpNext.getPosition(), fOutMagnitude /3f);
}
}
COM: <s> computes tangents for peak mode </s>
|
funcom_train/33854182 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ImageDescriptor getImageDescriptor(String id) {
ImageDescriptor imageDescriptor = imageDescriptors.get(id);
if (imageDescriptor == null) {
String pluginId = getDefault().getBundle().getSymbolicName();
imageDescriptor = AbstractUIPlugin.imageDescriptorFromPlugin(pluginId, ICON_PATH + id);
imageDescriptors.put(id, imageDescriptor);
}
return imageDescriptor;
}
COM: <s> call this method to retrieve the cache image descriptor for the given </s>
|
funcom_train/13260572 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Triangle edgeNeighbour(Vector tris, Vertex v1, Vertex v2) {
for (Enumeration e = tris.elements(); e.hasMoreElements();) {
Triangle t = (Triangle) e.nextElement();
if (!sameTriangle(t, this)) {
Vector<Vertex> verts = t.getVertices();
if (verts.contains(v1) && verts.contains(v2)) {
return t;
}
}
}
return null;
}
COM: <s> returns the triangle that shares a particular edge </s>
|
funcom_train/25291102 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValue(int index, Object value) {
if (value == null) {
throw new NullPointerException();
}
if (isLiveOrCompiled())
if (!this.getCapability(ALLOW_VALUE_WRITE))
throw new CapabilityNotSetException(Ding3dI18N.getString("ShaderAttributeObject1"));
if (isLive())
((ShaderAttributeArrayRetained)this.retained).setValue(index, value);
else {
((ShaderAttributeArrayRetained)this.retained).initValue(index, value);
}
}
COM: <s> sets the specified array element of the value of this shader </s>
|
funcom_train/49913852 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isFinished() {
for (Iterator iter = validators.keySet().iterator(); iter.hasNext();) {
Widget widget = (Widget) iter.next();
Validator validator = (Validator) validators.get(widget);
ErrorLabel errorLabel = (ErrorLabel) errors.get(widget);
if (validator != null) {
String org = errorLabel.getText();
boolean flag = validator.message(widget);
errorLabel.setText(org);
if (!flag) {
//if one validator fails return false
return false;
}
}
}
return true;
}
COM: <s> called when a event triggers </s>
|
funcom_train/3391364 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeDeprecated(ConstructorDoc constructor) {
String output = ((TagletOutputImpl)
(new DeprecatedTaglet()).getTagletOutput(constructor,
writer.getTagletWriterInstance(false))).toString();
if (output != null && output.trim().length() > 0) {
writer.print(output);
}
}
COM: <s> write the deprecated output for the given constructor </s>
|
funcom_train/27824077 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void collapsePath(TreePath path) {
if (!isExpanded(path))
return;
if (isEditing() && !getCellEditor().stopCellEditing())
return;
try {
fireTreeWillCollapse(path);
}
catch (ExpandVetoException vetoed) {
return;
}
m_treeMapper.collapsePath(path);
fireTreeCollapsed(path);
}
COM: <s> collapses specified path </s>
|
funcom_train/37870287 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void reindexCollection(XmldbURI collUri) throws EXistException, PermissionDeniedException {
DBBroker broker = null;
try {
broker = factory.getBrokerPool().get(user);
broker.reindexCollection(collUri);
LOG.debug("collection " + collUri + " and sub collection reindexed");
} catch (Throwable e) {
handleException(e);
} finally {
factory.getBrokerPool().release(broker);
}
}
COM: <s> the method code reindex collection code </s>
|
funcom_train/20310165 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void translateInstanceAttrib( Element expr, Individual ind, OntProperty p, Literal obj ) {
Element related = addElement( expr, DIGProfile.VALUE );
addNamedElement( related, DIGProfile.INDIVIDUAL, getResourceID( ind ) );
addNamedElement( related, DIGProfile.ATTRIBUTE, p.getURI() );
translateLiteral( obj, related);
}
COM: <s> translate a datatype property into a dig value element </s>
|
funcom_train/45715390 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getImageCellsCount() {
if (ImageProcessorOJ.getCurrentImage() != null) {
ImageOJ image = OJ.getData().getImages().getImageByName(ImageProcessorOJ.getCurrentImageName());
if (image != null) {
return image.getCellCount();
}
}
return 0;
}
COM: <s> returns numbe of cells in current image </s>
|
funcom_train/3121427 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateStatusLabel() {
if (reloadPath != null) {
statusLabel.setText("Reloading: " + model.getPath
(reloadPath.getLastPathComponent()));
if ((reloadCounter % 4) < 2) {
statusLabel.setForeground(Color.red);
}
else {
statusLabel.setForeground(Color.blue);
}
}
else if (!model.isReloading()) {
statusLabel.setText("Total Size: " + NumberFormat.getInstance().
format(model.getTotalSize(model.getRoot())));
statusLabel.setForeground(Color.black);
}
}
COM: <s> updates the status label based on reload row </s>
|
funcom_train/39165765 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void ensureGateInit() {
if(factory != null && factory instanceof ListableBeanFactory) {
String[] initNames = BeanFactoryUtils.beanNamesForTypeIncludingAncestors(
(ListableBeanFactory)factory, Init.class);
for(String name : initNames) {
factory.getBean(name);
}
}
}
COM: <s> to be called by subclasses to ensure that any </s>
|
funcom_train/18741684 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Layoutable getLayoutableFor(Object point) {
if (point instanceof Point2D) {
return this.toLayoutableMap.get(point);
} else {
assert point instanceof PortView;
Object cell = ((PortView) point).getParentView().getCell();
assert cell instanceof DefaultGraphCell;
return this.toLayoutableMap.get(cell);
}
}
COM: <s> returns the layoutable corresponding to a given tt port view tt or </s>
|
funcom_train/1846747 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parseInsertRows(final NativeDocument document) {
final NativeNodeList nodes = document.getDocumentElement().getChildNodes();
final RowData rowData = new RowData();
for (int i = 0; i < nodes.getLength(); i++) {
final NativeNode current = nodes.item(i);
rowData.addField(current.getNodeName(), current.getTextContent());
}
rows.add(rowData);
}
COM: <s> parses rows specified retrieved after an insert query call </s>
|
funcom_train/9273026 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String appendDatabaseAttributes(String database, PropertiesMap augmentedProperties) {
StringBuffer longDatabase = new StringBuffer(database);
for (Iterator keys = augmentedProperties.propertyNames();
keys.hasNext();)
{
String key = (String) keys.next();
if (key.equals(Attribute.USERNAME_ATTR) ||
key.equals(Attribute.PASSWORD_ATTR) ||
key.equals(Attribute.SSL_ATTR))
continue;
longDatabase.append(";" + key + "=" + augmentedProperties.getProperty(key));
}
return longDatabase.toString();
}
COM: <s> append attributes to the database name except for user password </s>
|
funcom_train/36062067 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void saveToDatabase( DefinitionSet definitionSet ) throws NoDatabaseConnectionException, SQLException{
Connection connection = null;
try{
connection = application.getDatabaseConnection(DatabaseAccessType.SCANNER);
for( int c = 0; c < definitionSet.size(); c++){
saveToDatabase(connection, definitionSet.get(c));
}
}
finally{
if( connection != null )
connection.close();
}
// Update the list of definition errors
DefinitionErrorList errors = DefinitionErrorList.load(application);
errors.clearOutdatedErrors(this.definitionSet);
}
COM: <s> causes the definition set to save all of the definitions to the database </s>
|
funcom_train/3359919 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int hashCode() {
int retval = 0;
try {
byte[] certData = this.getEncoded();
for (int i = 1; i < certData.length; i++) {
retval += certData[i] * i;
}
return (retval);
} catch (CertificateException e) {
return (retval);
}
}
COM: <s> returns a hashcode value for this certificate from its </s>
|
funcom_train/21700359 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ASMethod getMethod(String name) {
// TODO: does AS3 do overloading? This method will be no use
// if it does.
for (ASTIterator i=blockIter(); i.hasNext(); ) {
LinkedListTree member = i.next();
if (member.getType() == AS3Parser.METHOD_DEF) {
ASMethod meth = new ASTASMethod(member);
if (meth.getName().equals(name)) {
return meth;
}
}
}
return null;
}
COM: <s> returns the action script method with the given name or null if no </s>
|
funcom_train/21154160 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String findContextName(long mask){
Iterator maskIter = contextMap.keySet().iterator();
while (maskIter.hasNext()) {
String _element = (String) maskIter.next();
if((((Long)contextMap.get(_element)).longValue() & mask)!=0)
return _element;
}
return null;
}
COM: <s> searches for an element assigned to given mask </s>
|
funcom_train/11318913 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() throws Exception {
server = new Server(port);
WebAppContext context = new WebAppContext();
context.setDescriptor("src/main/resources/webapp/WEB-INF/web.xml");
context.setResourceBase("src/main/resources/webapp");
context.setContextPath("/");
server.setHandler(context);
server.start();
}
COM: <s> start the admin console in an embedded web server </s>
|
funcom_train/34340084 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getRegresar_formulario() {
if (regresar_formulario == null) {//GEN-END:|27-getter|0|27-preInit
// write pre-init user code here
regresar_formulario = new Command("ATRAS", Command.BACK, 0);//GEN-LINE:|27-getter|1|27-postInit
// write post-init user code here
}//GEN-BEGIN:|27-getter|2|
return regresar_formulario;
}
COM: <s> returns an initiliazed instance of regresar formulario component </s>
|
funcom_train/5899929 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void redraw(Writer out) throws IOException {
final Object mold = getMoldURI();
if (mold instanceof ComponentRenderer) {
((ComponentRenderer)mold)
.render(this, out != null ? out: ZkFns.getCurrentOut());
} else {
final Map attrs = new HashMap(2);
attrs.put("self", this);
getExecution()
.include(out, (String)mold, attrs, Execution.PASS_THRU_ATTR);
}
}
COM: <s> redraws this component </s>
|
funcom_train/16176925 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getMarksStyle() {
// NOTE: If the number of marks increases, we will need to do
// something better here...
if (_marks == 0) {
return "none";
} else if (_marks == 1) {
return "points";
} else if (_marks == 2) {
return "dots";
} else {
return "various";
}
}
COM: <s> get the marks style which is one of </s>
|
funcom_train/2389397 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getComputeModellMenuItem() {
if (computeModellMenuItem == null) {
computeModellMenuItem = new JMenuItem();
computeModellMenuItem.setText("Modell berechnen");
computeModellMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
computeModell();
}
});
}
return computeModellMenuItem;
}
COM: <s> this method initializes compute modell menu item </s>
|
funcom_train/31128548 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String setDHCPEnabled(boolean e){
String cmd = "AT+NDHCP=";
if(e) cmd += "1";
else cmd += "0";
String response = removeLeadingLineshift(commandTransaction(cmd));
//Se if we got the OK response in the read:
for (int i = 0; i < response.length(); i++) {
if(response.substring(i).startsWith("OK\r\n")){
String ipInfo = parseIpTable(response);
if(ipInfo != null) return "OK:"+ipInfo+"\r\n";
}
}
return response;
}
COM: <s> enable or disable the wi fi sensors dhcp client </s>
|
funcom_train/45599378 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void registerScriptDeletion(Script deletedScript) {
if (deletedScript.isIncremental()) {
registerIrregularScriptUpdate(INDEXED_SCRIPT_DELETED, deletedScript);
} else if (deletedScript.isRepeatable()) {
registerRepeatableScriptDeletion(deletedScript);
} else if (deletedScript.isPostProcessingScript()) {
registerPostprocessingScriptUpdate(POSTPROCESSING_SCRIPT_DELETED, deletedScript);
}
}
COM: <s> register that the given script has been deleted since the last update </s>
|
funcom_train/18593828 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireStepEvent(StepEvent event) {
Iterator iter;
synchronized(listeners) {
iter = ((ArrayList)listeners.clone()).iterator();
}
while (iter.hasNext()) {
StepListener sl = (StepListener)iter.next();
sl.stateChanged(event);
}
}
COM: <s> if this is used to propagate a failure error be sure to invoke </s>
|
funcom_train/46427952 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // private boolean reviseTable(Judgment judg, ArrayList table) {
// boolean revised = false;
// for (Object isBelief : table) {
// if (judg.noOverlapping((Judgment) isBelief)) {
// MatchingRules.revision(judg, (Judgment) isBelief, false);
// revised = true;
// }
// }
// return revised;
// }
COM: <s> revise existing beliefs or goals </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.