__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/6489063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void notifyListeners(NodeSelectionEvent ev) {
Vector list;
synchronized(this) { list = (Vector)_nodeListeners.clone(); }
for (int i=0; i < list.size(); i++) {
((NodeSelectionListener)list.elementAt(i)).nodeSelection(ev);
}
}
COM: <s> send a node selection event </s>
|
funcom_train/16608124 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String buildInstructorTestClasspath() {
StringBuffer cp = new StringBuffer();
cp.append(getProjectSubmission().getTestSetup().getAbsolutePath());
JavaBuilder.appendBuildServerToClasspath(cp);
JavaBuilder.appendJUnitToClassPath(cp);
if (getProjectSubmission().isPerformCodeCoverage())
JavaBuilder.appendCloverToClassPath(cp);
cp.append(File.pathSeparator);
cp.append(getProjectSubmission().getBuildOutputDirectory()
.getAbsolutePath());
return cp.toString();
}
COM: <s> build the classpath to be used for the offical instructor test cases </s>
|
funcom_train/28224876 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processHide(final String[] part) {
if (part.length < 2) {
usage(HIDE);
return;
}
String name = part[1];
if (name.equalsIgnoreCase(ALL)) {
cp.hideAll();
} else {
Agent person;
try {
person = (Agent) control.getWorld().getPersonByName(name);
} catch (AgentNotFoundException e) {
sendError("Who's " + name + "?");
return;
}
cp.hide(person);
}
}
COM: <s> process the command to hide an agent </s>
|
funcom_train/10509361 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getWidth() {
float width = 0.0F;
int percIndex = widthStr.indexOf('%');
if (percIndex > 0) {
width = Float.parseFloat(widthStr.substring(0, percIndex));
xPercent = true;
return width / HUNDRED;
} else {
xPercent = false;
return Float.parseFloat(widthStr);
}
}
COM: <s> get the width </s>
|
funcom_train/29709677 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getRelativeProjectFile(IProject project, String path) {
IVirtualComponent wbModule = ComponentCore.createComponent(_curProject);
if (wbModule != null) {
IVirtualFile reFile = wbModule.getRootFolder().getFile(path);
if (reFile.exists()) {
return reFile.getUnderlyingFile().getLocation().toOSString()
+ "/";
}
}
return null;
}
COM: <s> return location path of the file which the relative path to web project </s>
|
funcom_train/10299322 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireHelpSetRemoved(Object source, HelpSet helpset){
Object[] listeners = listenerList.getListenerList();
HelpSetEvent e = null;
for (int i = listeners.length - 2; i >= 0; i -= 2) {
if (listeners[i] == HelpSetListener.class) {
if (e == null) {
e = new HelpSetEvent(this, helpset,
HelpSetEvent.HELPSET_REMOVED);
}
((HelpSetListener)listeners[i+1]).helpSetRemoved(e);
}
}
}
COM: <s> fires a help set removed event </s>
|
funcom_train/10521778 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPort(QName portName) {
Port port = _service.getPort(portName.getLocalPart());
if (port == null) {
throw new IllegalArgumentException("Port name: '" + portName + "' was not found in the WSDL file.");
}
_port = port;
_operationCache.clear();
}
COM: <s> change the port of the service </s>
|
funcom_train/18480115 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireActionListeners(ActionEvent ev) {
List<ActionListener> l = new ArrayList<ActionListener>(action_listeners) ;
for(int i = l.size() - 1; i >= 0; i--) {
ActionListener listener = action_listeners.get(i) ;
listener.actionPerformed(ev) ;
}
}
COM: <s> fires an action event to all action listeners </s>
|
funcom_train/50802443 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SHouse getHouseFightingFor(SPlayer player) {
SHouse currentHouse = null;
ContractInfo playerContract = (ContractInfo)outstandingContracts.get(player.getName());
if (playerContract != null) { //if a contract exists, return employer
currentHouse = playerContract.getEmployingHouse();
} else { //hash returned null, which means no contract. fighting for own unit.
currentHouse = this;
}
return currentHouse;
}
COM: <s> could use contains key k in place of null check should prolly change </s>
|
funcom_train/25290068 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setScope(Group scope, int index) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_SCOPE_WRITE))
throw new CapabilityNotSetException(Ding3dI18N.getString("Light4"));
if (isLive())
((LightRetained)this.retained).setScope(scope, index);
else
((LightRetained)this.retained).initScope(scope, index);
}
COM: <s> replaces the node at the specified index in this light nodes </s>
|
funcom_train/46573849 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paint(Graphics g) {
dim = MainInstance.getSize();
addOn_radarViewPanel.MainInstance.setDrawPanelDimension(dim);
if ((state == false) && (rubberState == true)) {
super.paintComponent(g);
}
if ((state == true) || (rubberState == true)) {
g = mM.drawInfo(g);
}
state = false;
rubberState = true;
}
COM: <s> paints the communication drawing upon the background drawing field </s>
|
funcom_train/4349395 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawPositions() {
int[][] gameMatrix = this.gameFacade.getGameMatrix();
for (int col = 0; col < NUMBER_OF_COLUMNS; col++) {
for (int row = 0; row < NUMBER_OF_ROWS; row++) {
if (gameMatrix[col][row] != GameLogic.EMPTY) {
this.drawPosition(col, row, gameMatrix[col][row], true);
}
}
}
}
COM: <s> draws all the chips </s>
|
funcom_train/13759980 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Integer getPosOfParagraph(XWPFParagraph p){
int i, pos = 0;
for (i = 0 ; i < bodyElements.size() ; i++) {
if (bodyElements.get(i) instanceof XWPFParagraph){
if (bodyElements.get(i).equals(p)){
return pos;
}
pos++;
}
}
return null;
}
COM: <s> get position of the paragraph </s>
|
funcom_train/35675007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGenerateIsSetMethod() throws Exception {
_model.generateXjb(_xjbFile);
assertTrue(getSource(_xjbFile).contains("generateIsSetMethod=\"true\""));
_model.setGenerateIsSetMethod(false);
_model.generateXjb(_xjbFile);
assertTrue(getSource(_xjbFile)
.contains("generateIsSetMethod=\"false\""));
}
COM: <s> test the generate is set method parameter </s>
|
funcom_train/15411166 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String print(Throwable e) {
StringBuffer sb = new StringBuffer();
printThrowable(sb, e, false);
String line = sb.toString();
line = StringHelper.replaceString(line, "\r", "\\r");
line = StringHelper.replaceString(line, "\n", "\\n");
return line;
}
COM: <s> convert the error into a string representation </s>
|
funcom_train/33281904 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public XMLDocument jsxFunction_parseFromString(final String str, final String contentType) {
final XMLDocument document = new XMLDocument();
document.setParentScope(getParentScope());
document.setPrototype(getPrototype(XMLDocument.class));
document.jsxFunction_loadXML(str);
return document;
}
COM: <s> the string passed in is parsed into a dom document </s>
|
funcom_train/22471053 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getEventCount(long userid, int kind) {
InternalLookup lookup = _perUserLookupTable.get(userid);
if (lookup == null) {
return 0;
}
switch (kind) {
case Event.played:
return lookup._playCount;
case Event.downloaded:
return lookup._downloadCount;
case Event.requested:
return lookup._requestCount;
case Event.skipped:
return lookup._skipCount;
default:
return 0;
}
}
COM: <s> returns the amount of events of a certain type </s>
|
funcom_train/4921503 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMultipleMissingTags() {
// Record issue for each missing unique tag
this.issues.addIssue(LocationType.OFFICE_FLOOR, "office-floor",
AssetType.OFFICE_FLOOR, "OfficeFloor",
"Property 'tag.one' must be specified");
this.issues.addIssue(LocationType.OFFICE_FLOOR, "office-floor",
AssetType.OFFICE_FLOOR, "OfficeFloor",
"Property 'tag.two' must be specified");
this.record_officeFloorBuilder_addOffice("OFFICE");
// Missing properties only an issue
this.compile(true);
}
COM: <s> ensure issue for each missing tag </s>
|
funcom_train/2581707 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getFirstMillisecond(Calendar calendar) {
calendar.set(this.year, Calendar.JANUARY, 1, 0, 0, 0);
calendar.set(Calendar.MILLISECOND, 0);
// in the following line, we'd rather call calendar.getTimeInMillis()
// to avoid object creation, but that isn't supported in Java 1.3.1
return calendar.getTime().getTime();
}
COM: <s> returns the first millisecond of the year evaluated using the supplied </s>
|
funcom_train/46833116 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getJComboFrom() {
if (jComboFrom == null) {
jComboFrom = new JTextField();
jComboFrom.setText(EBIPGFactory.emailFrom);
jComboFrom.setBounds(new Rectangle(90, 60, 360, 22));
jComboFrom.setEditable(true);
}
return jComboFrom;
}
COM: <s> this method initializes j combo from </s>
|
funcom_train/35837847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void validateController() {
int count = vtRows.size();
boolean hasPanel = false;
int panelCount = 0;
UIToolBarControllerRow row = null;
for (int i=0; i<count; i++) {
row = (UIToolBarControllerRow)vtRows.elementAt(i);
panelCount = row.getVisibleCount();
if (panelCount != 0) {
hasPanel = true;
break;
}
}
if (!hasPanel) {
setVisible(false);
}
}
COM: <s> check if all rows are empty and if so close area </s>
|
funcom_train/3415788 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean implies(Permission p) {
if (!(p instanceof PropertyPermission))
return false;
PropertyPermission that = (PropertyPermission) p;
// we get the effective mask. i.e., the "and" of this and that.
// They must be equal to that.mask for implies to return true.
return ((this.mask & that.mask) == that.mask) && super.implies(that);
}
COM: <s> checks if this property permission object implies the specified </s>
|
funcom_train/175098 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Thread addThread(Runnable firstTask) {
Worker w = new Worker(firstTask);
Thread t = threadFactory.newThread(w);
if (t != null) {
w.thread = t;
workers.add(w);
int nt = ++poolSize;
if (nt > largestPoolSize)
largestPoolSize = nt;
}
return t;
}
COM: <s> creates and returns a new thread running first task as its first </s>
|
funcom_train/11022171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void forward(String path) throws IOException {
RequestDispatcher rd = request.getRequestDispatcher(path);
if (rd == null) {
throw new IOException("No request dispatcher returned for path '"
+ path + "'");
}
try {
rd.forward(request, response);
} catch (ServletException ex) {
throw ServletUtil.wrapServletException(ex, "ServletException including path '"
+ path + "'.");
}
}
COM: <s> forwards to a path </s>
|
funcom_train/45785952 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJbtnBuscar() {
if (jbtnBuscar == null) {
jbtnBuscar = new JButton();
jbtnBuscar.setBounds(new Rectangle(241, 15, 85, 20));
jbtnBuscar.setText("Buscar");
jbtnBuscar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
buscarcliente();
}
});
}
return jbtnBuscar;
}
COM: <s> this method initializes jbtn buscar </s>
|
funcom_train/46327700 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean delete(Long ruleActionParameterID) {
if (ruleActionParameterID == null) {
throw new IllegalArgumentException("primary key null.");
}
// Set the whereArgs to null here.
return database.delete(DATABASE_TABLE, KEY_RULEACTIONPARAMETERID + "=" + ruleActionParameterID,
null) > 0;
}
COM: <s> delete a rule action parameter record </s>
|
funcom_train/5508054 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFont(Font f) {
super.setFont(f);
invalidate();
validate();
// the following two lines are a hack to get the box to redraw properly
// I'll figure out a better way sometime...
((CardLayout) getLayout()).next(this);
((CardLayout) getLayout()).previous(this);
repaint();
}
COM: <s> set the font to use when writing the tab text </s>
|
funcom_train/44310052 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ObjectIndex addIndex(ObjectIndex newIdx) {
Object existing = m_indexes.put(newIdx.getKeyClass(), newIdx);
if (existing != null) {
throw new IllegalArgumentException("Index for " + newIdx.getClassToIndex().getName() +
" already exists");
}
newIdx.setObjectContext(this);
return newIdx;
}
COM: <s> add an index to the context </s>
|
funcom_train/21117759 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setResolved(ENIACI eniac, Word source, Word argument) throws OutOfBoundsException, InexistentRegisterException {
RegistersI registers = null;
Address register = null;
//Get registers.
registers = eniac.getVCPU().getRegisters();
//Resolve address register.
register = argument.getAddressArgument();
//Save the value into the register.
registers.setRegister(register, source);
}
COM: <s> saves a value into a specified register </s>
|
funcom_train/45896165 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeBit(int aBit) throws IOException {
if (iOs == null) {
throw new IOException("Already closed");
}
if (aBit != 0 && aBit != 1) {
throw new IOException(aBit + " is not a bit");
}
iBuffer |= aBit << iBitCount;
iBitCount++;
if (iBitCount == 8) {
flushBits();
}
}
COM: <s> write a single bit to the stream </s>
|
funcom_train/28353017 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: synchronized public DataAdaptor getChildAdaptor( final AcceleratorSeq sequence, final String tag ) {
if ( !_sequenceAdaptors.containsKey( sequence ) ) {
final DataAdaptor adaptor = _documentAdaptor.createChild( "sequence" );
adaptor.setValue( "id", sequence.getId() );
_sequenceAdaptors.put( sequence, adaptor );
}
final DataAdaptor sequenceAdaptor = (DataAdaptor)_sequenceAdaptors.get( sequence );
return sequenceAdaptor.createChild( tag );
}
COM: <s> get a new node adaptor for the specified sequence </s>
|
funcom_train/50770617 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // public FilterModuleElementReference addFilterModuleElementReference(Vector pack, String concern, String filterm, String fmelem) {
// fmeref = new FilterModuleElementReference();
// fmeref.setFilterModule(filterm);
// fmeref.setPackage(pack);
// fmeref.setConcern(concern);
// fmeref.setName(fmelem);
// Main.all.add(fmeref);
// return(fmeref);
// }
COM: <s> creates a reference to a filter module element reference </s>
|
funcom_train/39537973 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertAfter(ExtendedGeneralPath insertedPathShape){
//creating the concatenation of this path shape with the provided one
ExtendedGeneralPath newPathShape=new ExtendedGeneralPath();
newPathShape.append(pathShape.getExtendedPathIterator(), false);
//removing the first segment of the provided path
insertAllButFirst(insertedPathShape, newPathShape);
//setting the new path
this.pathShape=newPathShape;
//computing the normalized segments
rootSegment=getSegments(pathShape);
}
COM: <s> inserts the provided path after this one </s>
|
funcom_train/20307534 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String dump() {
StringBuffer sb = new StringBuffer();
for (Iterator i = nodeMap.values().iterator(); i.hasNext(); ) {
GraphNode n = (GraphNode)i.next();
sb.append(n.dump());
sb.append("\n");
}
return sb.toString();
}
COM: <s> dump a description of the cache to a string for debug </s>
|
funcom_train/4530851 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int numLiveDataNodes() {
int numLive = 0;
synchronized (datanodeMap) {
for(Iterator<DatanodeDescriptor> it = datanodeMap.values().iterator();
it.hasNext();) {
DatanodeDescriptor dn = it.next();
if (!isDatanodeDead(dn) ) {
numLive++;
}
}
}
return numLive;
}
COM: <s> number of live data nodes </s>
|
funcom_train/16742468 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ICOFile getICOFile() {
if (_icoFile == null) {
try {
_icoFile = new ICOFile("[ImageInputStream]",
new ImageInputStreamDecoder(_stream));
} catch (IOException e) {
System.err.println("Can't create ICOFile: " + e.getMessage());
}
}
return _icoFile;
}
COM: <s> get icofile object cached </s>
|
funcom_train/25187312 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRemove_Object() {
System.out.println("remove");
for (Object o : getTestArrays()) {
NonResizableListForArray instance = new NonResizableListForArray(o);
try {
instance.remove(instance.get(0));
fail("NonResizableListForArray is read-only and MUST NOT aspport operations affecting size: remove");
} catch (UnsupportedOperationException uoex) {
}
}
}
COM: <s> test of remove method of class non resizable list for array </s>
|
funcom_train/12191913 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addHeader(final String name, final String value) {
if (headers == null) {
headers = new LinkedHashMap();
}
final String key = name.toLowerCase();
List values = (List) headers.get(key);
if (values == null) {
values = new LinkedList();
headers.put(key, values);
}
values.add(value);
}
COM: <s> sets the value of the specified header </s>
|
funcom_train/3528312 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reconnectServices() {
try {
if (token == null) {
store.connectIfNeeded(null);
} else {
store.connectIfNeeded(token.getCredentialsToken());
}
} catch (ServiceConnectionFailedException e) {
parseUri(this.uri);
} catch (ServiceAccessException e) {
parseUri(this.uri);
}
}
COM: <s> reconnect the uri services </s>
|
funcom_train/16380282 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDisplayedAnswersPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(new UnsettablePropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_McSubTaskDefType_displayedAnswers_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_McSubTaskDefType_displayedAnswers_feature", "_UI_McSubTaskDefType_type"),
CTEPackage.Literals.MC_SUB_TASK_DEF_TYPE__DISPLAYED_ANSWERS,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the displayed answers feature </s>
|
funcom_train/31339231 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void logWarning(String msg, Exception e) {
if (msg == null)
msg = ""; //$NON-NLS-1$
getLog().log(new Status(IStatus.WARNING, getBundle().getSymbolicName(), IStatus.WARNING, msg, e));
}
COM: <s> log a warning message </s>
|
funcom_train/48089034 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getExitCommand() {
if (exitCommand == null) {//GEN-END:|30-getter|0|30-preInit
// write pre-init user code here
exitCommand = new Command("Sair", Command.EXIT, 0);//GEN-LINE:|30-getter|1|30-postInit
// write post-init user code here
}//GEN-BEGIN:|30-getter|2|
return exitCommand;
}
COM: <s> returns an initiliazed instance of exit command component </s>
|
funcom_train/12118400 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void connEtoC62(java.awt.event.ActionEvent arg1) {
try {
// user code begin {1}
// user code end
this.rivalutazioniModificaJButton_ActionPerformed(arg1);
// user code begin {2}
// user code end
} catch (java.lang.Throwable ivjExc) {
// user code begin {3}
// user code end
handleException(ivjExc);
}
}
COM: <s> conn eto c62 rivalutazioni modifica jbutton </s>
|
funcom_train/3446563 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void declareVisualColumns(ItemRenderer ir) {
if (ir == null) {
ir = ItemRendererFactory.createItemRenderer(this);
}
setItemRenderer(ir);
DefaultVisualColumn vc = new DefaultVisualColumn(
VISUAL_SHAPE, false);
vc.setColumn(shapes);
putVisualColumn(vc);
}
COM: <s> declares the visual columns of this visualization </s>
|
funcom_train/17386353 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void botInstanceStopping() throws IOException, PluginException {
Enumeration<BotPlugin> e = botPlugins.elements();
while (e.hasMoreElements()) {
BotPlugin plugin = (BotPlugin) e.nextElement();
((BotCallback) plugin.getCallback()).botInstanceStopping(plugin.getData());
}
}
COM: <s> this is called when the instance of the bot is ending </s>
|
funcom_train/15859037 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAttribute(String dn, String attrType, String attrValue) throws LDAPException {
/* build a new attribute */
LDAPAttribute attribute = new LDAPAttribute(attrType, attrValue.getBytes());
/* build a new modification */
LDAPModification modification = new LDAPModification(LDAPModification.ADD, attribute);
this.ldapAccess.checkConnection();
/* submit the modification to the directory */
this.ldapAccess.ldapConnection.modify(dn, modification);
}
COM: <s> adds an attribute to a specific entry </s>
|
funcom_train/18329057 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getAsString(String parameterName) {
Object obj = get(parameterName);
if (obj instanceof String || obj == null) {
return (String) obj;
}
Matcher matcher = s_paramPattern.matcher(parameterName);
if (!matcher.find()) {
log.error("Parameter does not conform to definition: "
+ parameterName);
return null;
}
if (matcher.group(5) != null) {
return (String) formatResult(obj, matcher.group(5));
}
return obj.toString();
}
COM: <s> extracts the variable for the variable name and converts the parameter to </s>
|
funcom_train/18518503 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addExceptions(UtilBusinessException[] arrExcpts, boolean ignoreFields) {
if (arrExcpts != null && arrExcpts.length > 0) {
for (int i = 0, arrExcptsLen = arrExcpts.length; i < arrExcptsLen; i++) {
this.addException(arrExcpts[i], ignoreFields);
}
}
}
COM: <s> add the exceptions in the given array to this agregate exception </s>
|
funcom_train/16408260 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTabbedPane getJTabbedPane() {
if (jTabbedPane == null) {
jTabbedPane = new JTabbedPane();
jTabbedPane.addTab("Text (read only)", null, getJTextArea(), null);
jTabbedPane.addTab("Table", null, getJTable(), null);
}
return jTabbedPane;
}
COM: <s> this method initializes j tabbed pane </s>
|
funcom_train/13867138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addToEnd() {
ChainEntry tail = head.prev;
// Chain is valid.
assert (head != null && tail != null);
// This entry is not in the list.
assert (next == null) && (prev == null);
// Update me.
prev = tail;
next = head;
tail.next = head.prev = this;
}
COM: <s> add this node to the end of the chain </s>
|
funcom_train/2027743 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetUri() throws Exception {
String uri = this.registry.getURI(prefix_jcr);
assertEquals(uri_jcr, uri);
uri = this.registry.getURI(prefix_empty);
assertEquals(uri_empty, uri);
uri = this.registry.getURI(prefix_mix);
assertEquals(uri_mix, uri);
}
COM: <s> tests get uri using the built in prefixes </s>
|
funcom_train/3927567 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public Optimizer createChisel( String name ) {
Optimizer x = (Optimizer)factoryTable.get( name );
//if ( x == null ) System.out.println( "createChisel of " + name + " returned null" );
//else System.out.println( "createChisel of " + name + " got a chisel " + x.getClass().getName() );
if ( x != null ) {
x.reset();
}
return( x );
}
COM: <s> get a chisel from the prototype table </s>
|
funcom_train/2903123 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean initBackground(String path){
File saved = new File(path);
if(saved.exists()){
try{
FileInputStream fis = new FileInputStream(saved);
bkgrd = new ZBackground(XMLHandler.parseXML((InputStream)fis));
bkgrd.setTransferHandler(transferManager);
bkgrd.setControlPanel(controlPanel);
fis.close();
return true;
}
catch(Exception e){
new JXError(getClass(), "Error initializing background properties, file="+path, e.getStackTrace());
}
}
return false;
}
COM: <s> restore previous saved background property values </s>
|
funcom_train/44724052 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Member getMember(String memberName) {
int index = getIndexOfMember(memberName, members);
if (index > -1) {
return (Member) members.get(index);
} else {
throw new RuntimeException("Member '" + memberName + "' cannot be found for entity '" + this.getName() + "'");
}
}
COM: <s> get a member by name </s>
|
funcom_train/26024795 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createUI() {
final JSplitPane splitPane = new JSplitPane(
JSplitPane.HORIZONTAL_SPLIT, createLeftPanel(),
createRightPanel());
// Add a listener to set the divider location appropriately
addComponentListener(new ComponentAdapter() {
@Override
public void componentResized(ComponentEvent event) {
splitPane.setDividerLocation(0.5d);
}
});
splitPane.setOneTouchExpandable(true);
add(splitPane);
}
COM: <s> creates the editor ui </s>
|
funcom_train/33938936 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JSONObject getJsonCodes(Long codeTypeId){
List<Code> codes = this.getCodes(codeTypeId);
JSONArray data = new JSONArray();
for(Code code : codes){
data.add(Code.toJSONObject(code));
}
JSONObject jo = new JSONObject();
jo.put(ExtJs.STORE_root, data);
jo.put(ExtJs.STORE_totalProperty, codes.size());
return jo;
}
COM: <s> ext combo store </s>
|
funcom_train/35051403 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanel_gbroker() {
if (jPanel_gbroker == null) {
jPanel_gbroker = new JPanel();
jPanel_gbroker.setLayout(new BorderLayout());
jPanel_gbroker.add(getJScrollPane(), BorderLayout.CENTER);
jPanel_gbroker.add(getJPanel(), BorderLayout.SOUTH);
}
return jPanel_gbroker;
}
COM: <s> this method initializes j panel gbroker </s>
|
funcom_train/38185030 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void closeOnProvider(int providerId) throws ActiveJmsException {
try {
log.finer("closeProvider called with providerId of '" + providerId + "'.");
this.getProvider(providerId).close();
}
catch (NamingException exception) {
throw new ActiveJmsException(exception.getMessage());
}
}
COM: <s> closes the initial context assigned to the given provider </s>
|
funcom_train/46759878 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LoincModel getLoinc(final long loincId, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
if (call.isStoreAudit()) {
BaseData.getSecurity().storeAudit(call.getUserRefId(), loincId, "Viewed Loinc", call);
}
return ClinicalData.getLoinc(loincId, call);
}}; return (LoincModel) call(method, call);
}
COM: <s> return the single loinc model for the primary key </s>
|
funcom_train/18045965 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setToggleFudgeDetector(int det){
if(!this.getDataLayout().isEdge(det)){
if(fudgeDetectorSet.contains(det)){
fudgeDetectorSet.remove(det);
}else{
fudgeDetectorSet.add(det);
}
this.stateChangedNNJ( NNJChangeEvent.factorySomeChannels(det) );
}
}
COM: <s> toggles the fudge status of the detector </s>
|
funcom_train/13631055 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void makeIdent() {
for (int i = 0; i < 2; i++) {
for (int j = 0; j < 2; j++) {
if (i == j) {
set(i, j, 1.0f);
} else {
set(i, j, 0.0f);
}
}
}
}
COM: <s> initialize to the identity matrix </s>
|
funcom_train/32056569 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetFont() {
System.out.println("testSetFont");
DefaultGraphCellEditor dgce = new DefaultGraphCellEditor();
Font f = new Font("blah",1,2);
dgce.setFont(f);
assertEquals("test set font", dgce.getFont(), f);
}
COM: <s> this function tests set font function of default graph cell editor class </s>
|
funcom_train/21171986 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateHighlighters() {
// Set the colors on the status bar
Set<Map.Entry<String, Color>> highlighters = User.getUser().getHighlighters();
int i = 0;
for (Map.Entry<String, Color> currHighlighter : highlighters) {
setColor (i, currHighlighter.getKey(), currHighlighter.getValue());
/*if (i==0) {
setColorBackground(currHighlighter.getValue());
}*/
i++;
}
}
COM: <s> this method sets up the names and colors of the highlighters available </s>
|
funcom_train/7266276 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initScheduledExecutor() {
ThreadFactory factory = new ThreadFactory() {
public Thread newThread(Runnable r) {
Thread thread = getThreadFactory().newThread(r);
thread.setName(name + "-ContextScheduledThreadPool");
thread.setDaemon(true);
return thread;
}
};
scheduledExecutor = Executors.newScheduledThreadPool(1, factory);
}
COM: <s> initializes contexts scheduled executor </s>
|
funcom_train/18093066 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void visitInnerClassType(final String name) {
if (DEBUG) System.out.println("visitInnerClassType " + name);
if (argumentStack % 2 != 0) {
declaration.append('>');
}
argumentStack /= 2;
argumentStackPosition.pop();
declaration.append('.');
declaration.append(separator).append(name.replace('/', '.'));
separator = "";
argumentStack *= 2;
argumentStackPosition.push(stack.size());
}
COM: <s> visits an inner class </s>
|
funcom_train/9676181 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void commit(FileRequest req) {
File files[] = new File[] { req.getHead(), req.getBody() };
for (int i = 0; i < files.length; i++) {
File f = files[i];
if (!f.delete())
log.warn("Could not delete " + f);
}
}
COM: <s> removes the source files which makes the message receipt permanent </s>
|
funcom_train/44162648 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void growBranch(Direction direction, int increment) {
for (int i=0; i<Direction.longSides.length; i++) {
if (Direction.longSides[i] == direction) {
branch[i] = Math.min(TileImprovement.LARGE_RIVER,
Math.max(TileImprovement.NO_RIVER,
branch[i] + increment));
break;
}
}
}
COM: <s> increases the size a branch </s>
|
funcom_train/21359153 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isHit(double spectraMZ, double fragmentMZ) {
// ToDo: maybe extract into separate class/utility (to make configurable and provide unified consistent use)
// return true if the fragmentMZ is in the interval (around the spectrum peak MZ)
// that is defined by the fragment mass error.
return fragmentMZ > spectraMZ - fragmentMassError && fragmentMZ < spectraMZ + fragmentMassError;
}
COM: <s> determines if the provided m z of the fragment ion matches the </s>
|
funcom_train/43410138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BrowsePanel getJAddPackagingMaterialInnerPanel() {
if (jAddPackagingMaterialInnerPanel == null) {
CommonTableModel tableModel = new CommonTableModel(
TableModels.PACKAGING_MATERIAL_COLUMNS,
TableModels.PACKAGING_MATERIAL_METHODS);
PackagingMaterialFilterManager mgr = new PackagingMaterialFilterManager();
tableModel.setList(mgr.getList());
jAddPackagingMaterialInnerPanel = new BrowsePanel(mgr, tableModel);
jAddPackagingMaterialInnerPanel.setAddEnabled(true);
}
return jAddPackagingMaterialInnerPanel;
}
COM: <s> this method initializes j add packaging material inner panel </s>
|
funcom_train/20767981 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void publish(LogRecord record) {
String message = null;
if (isLoggable(record)) {
try {
message = getFormatter().format(record);
} catch (Exception e) {
reportError(null, e, ErrorManager.FORMAT_FAILURE);
return;
}
try {
window.addLogInfo(message);
} catch (Exception e) {
reportError(null, e, ErrorManager.WRITE_FAILURE);
}
}
}
COM: <s> if record is loggable format it and add it to window </s>
|
funcom_train/37871204 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void update() {
_name.setText(_queryEntity != null && _queryEntity.getName() != null ? _queryEntity
.getName() : "");
_quantity.setText(Integer.toString(_queryEntity.getQuantity()));
_query.setText(_queryEntity != null && _queryEntity.getQuery() != null ? _queryEntity
.getQuery() : "");
}
COM: <s> update the entities </s>
|
funcom_train/8417766 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double wordProbability(Word openLetters, Word sevenLWord){
double probability=50;
Word diff= sevenLWord.subtract(openLetters);
l.trace("sevenLword: " +sevenLWord.getWord()+ " openLetters: "+ openLetters.getWord());
for(int i=0;i<26;i++){
if(diff.countKeep[i]>0){
char c= (char)(i+65);
//l.debug("draw probability of character " + String.valueOf(c) + "is "+ drawProbability(c));
probability = probability * drawProbability(c);
}
}
return probability;
}
COM: <s> returns the bid probability of the word being formed from the current rack </s>
|
funcom_train/44659320 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean hasChanged( int[] oldValue, int[] newValue ) {
if( oldValue.length == newValue.length ) {
for( int i = 0; i < newValue.length; i++ ) {
if( oldValue[i] != newValue[i] ) {
return true;
}
}
return false;
}
return true;
}
COM: <s> see if two arrays are different </s>
|
funcom_train/23216771 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addObserverRolePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ObserverPredicate_observerRole_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ObserverPredicate_observerRole_feature", "_UI_ObserverPredicate_type"),
ContractPackage.Literals.OBSERVER_PREDICATE__OBSERVER_ROLE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the observer role feature </s>
|
funcom_train/49912769 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPacketListener(StanzaType stanzaType, StanzaEvent stanzaEvent) {
Vector<StanzaEvent> vector = listeners.get(stanzaType);
if (vector == null) {
vector = new Vector<StanzaEvent>();
listeners.put(stanzaType, vector);
}
vector.add(stanzaEvent);
}
COM: <s> registers a packet listener with this reader </s>
|
funcom_train/3275857 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString () {
//Sun Nov 3, 21:11 CET 2002
StringBuffer sb = new StringBuffer(27);
sb.append(dayOfWeek)
.append(" ")
.append(month)
.append(" ");
if (day < 10)
sb.append(" ");
sb.append(day)
.append(", ");
if (hour < 10)
sb.append("0");
sb.append(hour)
.append(":");
if (minute < 10)
sb.append("0");
sb.append(minute)
.append(" ");
if (tzoneID == null)
sb.append("???");
else
sb.append(tzoneID);
sb.append(" ")
.append(year);
return sb.toString();
}
COM: <s> returns a string in the common ics date format </s>
|
funcom_train/33158402 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insert(final int index, final int value) {
if (index < 0 || index > length) {
throw new IndexOutOfBoundsException();
}
if (length >= capacity) {
throw new MachineException("Stack is full");
}
if (length-index > 0) {
System.arraycopy(elements, index, elements, index+1, length-index);
}
elements[index] = value;
length += 1;
fireInsert(index, value);
}
COM: <s> insert a stack element before a specific index </s>
|
funcom_train/3597313 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addButtonFrame() {
JInternalFrame iframe =
new JInternalFrame("Actions", true, false, true, true);
iframe.setSize(new Dimension(280, 70));
iframe.setLocation(new Point(450,0));
JPanel panel = new JPanel();
JButton nbut = new JButton("Change gesture type");
nbut.addActionListener(this);
panel.add(nbut);
iframe.getContentPane().add(panel);
iframe.setVisible(true);
desktop.add(iframe);
}
COM: <s> add a frame to the ui with a button for changing gesture type </s>
|
funcom_train/25708017 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String generateCHK(final File file) throws IOException {
// generate chk, use mime type
final FcpResultPut result = putKeyFromFile(FcpHandler.TYPE_FILE, "CHK@", file, true, true, null);
if( result == null || result.isSuccess() == false ) {
return null;
} else {
return result.getChkKey();
}
}
COM: <s> generates a chk key for the given file no upload </s>
|
funcom_train/18166667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String expandRelativePath(String relativePath, String variable) {
if (relativePath == null) { return null; }
String value = vars.get(variable);
if (relativePath.startsWith(variable)) {
String newPath = relativePath.replace (variable, value);
newPath = newPath.replace(defaultSeparatorChar, java.io.File.separatorChar);
return newPath;
}
// Have nothing to say! So return here.
return relativePath;
}
COM: <s> seek to expand strings of form workspace some file here with only the </s>
|
funcom_train/16528438 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireCardChanged(ChoiceCardUI choiceCardUI, String changeType) {
CardChangeEvent cardChangeEvent = new CardChangeEvent(this, choiceCardUI, changeType);
Iterator<CardChangeListener> cardChangeIterator = cardChangeListeners.iterator();
while(cardChangeIterator.hasNext()) {
cardChangeIterator.next().cardChanged(cardChangeEvent);
}
}
COM: <s> used for firing changes to match choice or bucket cards </s>
|
funcom_train/2289237 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getSelectedValue(CmsObject cms, I_CmsWidgetParameter param) {
String paramValue = param.getStringValue(cms);
if (CmsStringUtil.isEmpty(paramValue)) {
CmsSelectWidgetOption option = CmsSelectWidgetOption.getDefaultOption(m_selectOptions);
if (option != null) {
paramValue = option.getValue();
}
}
return paramValue;
}
COM: <s> returns the currently selected value of the select widget </s>
|
funcom_train/44495674 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void assertTextInputEquals(final String textInputValue, final String textInputName, final WebForm webForm) {
String msg = "assertTextInputEquals: '" + textInputName + "'";
int assertLevel = AssertLevel.NO_LEVEL;
assertTextInputEquals(msg, textInputValue, textInputName, webForm, assertLevel);
}
COM: <s> validates the value of the text input field </s>
|
funcom_train/22648904 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toUpperCase(Locale locale) {
// Must return self if chars unchanged
StringBuilder buffer = new StringBuilder();
for (int i=offset; i<offset+count; i++) {
buffer.append((char) toUpperCaseImpl(value[i]));
}
String ret = buffer.toString();
if (this.equals(ret)) {
return this;
} else {
return ret;
}
}
COM: <s> converts the characters in this string to uppercase using the specified </s>
|
funcom_train/44156662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addServerConfig(Map<String, String> conf) throws MojoExecutionException {
//check for existence of file
if (xmldoc == null) {
createXML();
}
Element server = xmldoc.createElement("server");
for (Map.Entry<String, String> e : conf.entrySet()) {
server.setAttribute(e.getKey(), e.getValue());
}
xmldoc.getElementsByTagName("servers").item(0).appendChild(server);
storeXML();
}
COM: <s> adds a server to the servers </s>
|
funcom_train/4427385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void commitPhi(NodeBlock innerJoin) {
for (Instruction instruction : innerJoin.getInstructions()) {
InstPhi phi = (InstPhi) instruction;
Var oldVar = phi.getOldVariable();
Var newVar = phi.getTarget().getVariable();
// updates the current value of "var"
uses.put(oldVar.getName(), newVar);
if (join != null) {
insertPhi(oldVar, newVar);
}
// remove reference to old variable in phi
phi.setOldVariable(null);
}
}
COM: <s> commits the phi assignments in the given join node </s>
|
funcom_train/3305385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void select (int index) {
checkWidget();
if (index == -1) {
list.deselectAll ();
text.setText (""); //$NON-NLS-1$
return;
}
if (0 <= index && index < list.getItemCount()) {
if (index != getSelectionIndex()) {
text.setText (list.getItem (index));
text.selectAll ();
list.select (index);
list.showSelection ();
}
}
}
COM: <s> selects an item </s>
|
funcom_train/46718912 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean getParameterAsBoolean (String param, boolean defaultValue) {
boolean result;
String textValue = getParameter(param);
if (textValue == null) {
result = defaultValue;
}
else {
result = textValue.equalsIgnoreCase("yes")
|| textValue.equalsIgnoreCase("true")
|| textValue.equalsIgnoreCase("1")
|| textValue.equalsIgnoreCase("+");
}
return result;
}
COM: <s> get the value of a command line parameter as a boolean value </s>
|
funcom_train/1899109 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createRoot() {
if (username == null) {
throw new IllegalStateException("set username first!");
}
try {
final LdapDN dnUsername = new LdapDN("ou=" + username + ",o=gmail," + ROOT_DN);
if (!service.getAdminSession().exists(dnUsername)) {
logger.debug("No root dn found, adding root entries...");
addRootEntries();
}
} catch (Exception e) {
throw new RuntimeException(e);
}
}
COM: <s> inject the gmail2ldap root entry </s>
|
funcom_train/7966113 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parse(InputStream inputStream) throws IOException {
if(inputStream == null) {
throw new IllegalArgumentException();
}
try {
int ic;
char c;
while( ( ic = inputStream.read() ) != -1 ) {
c = (char) ic;
processChar(c);
}
closeMarkersStack();
} finally {
clear();
}
}
COM: <s> parses an input stream generating output on the emitter </s>
|
funcom_train/16822993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateNormals(FastGeometryBuilder<?, ?> aFastGeometryBuilder) {
if (!openGLGeometryBuilderImpl.complete) {
throw new IllegalStateException(
"Updates are not permitted until after the first time the geometry builder has been enabled.");
}
final IntBuffer normalAsBuffer = openGLGeometryBuilderImpl.normalsAsBuffer;
normalAsBuffer.position(normalsPositionInBuffer);
normalAsBuffer.put(((FastGeometryBuilderImpl<?, ?>) aFastGeometryBuilder).normalComponents);
normalAsBuffer.position(0);
}
COM: <s> updates the normals associated with this geometry </s>
|
funcom_train/15627500 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void paintGameObjectIfVisible(@NotNull final Graphics2D g, final int xStart, final int yStart, @NotNull final G gameObject) {
final G head = gameObject.getHead();
if (isGameObjectVisible(head)) {
paintGameObject(g, xStart, yStart, gameObject, false);
}
}
COM: <s> paints a single </s>
|
funcom_train/19421652 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String resolveKeyBasedQuery() {
String returnValue = hqlStatement;
Iterator i = parameters.keySet().iterator();
while (i.hasNext()) {
String key = i.next().toString();
if (key.startsWith(DataConnector.RECORD_KEY_PARAMETER)) {
String symbolic = "{" + key + "}";
returnValue = StringUtils.replace(returnValue, symbolic, parameters.get(key).toString());
}
}
return returnValue;
}
COM: <s> p returns the query statement in use for this data access bean </s>
|
funcom_train/8080202 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toGraph() {
try {
StringBuffer resultBuff = new StringBuffer();
toGraph(resultBuff, 0);
String result = "digraph Tree {\n" + "edge [style=bold]\n" + resultBuff.toString()
+ "\n}\n";
return result;
} catch (Exception e) {
return null;
}
}
COM: <s> outputs the decision tree as a graph </s>
|
funcom_train/27945959 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setParserBootPath(NbClassPath path) {
if (path == getParserBootPath() ||
(path != null && path.equals(getParserBootPath())))
// no change.
return;
NbClassPath old = parserBootPath;
parserBootPath = path;
firePropertyChange(PROP_PARSER_BOOTPATH, old, path); // NOI18N
}
COM: <s> setter for parser boot class path </s>
|
funcom_train/10281815 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void uploadProduction() {
XProduction lCurrentProduction = mProductionModel
.getCurrentProduction();
if (lCurrentProduction != null) {
File file = lCurrentProduction.getFile();
mView.mUploadPanel.fillPanel(lCurrentProduction);
mView.showTab(ProductionView.TAB_TRANSFER);
}
}
COM: <s> show the upload podcast tab </s>
|
funcom_train/24628317 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CryptFilter getCryptFilter(Dict stream) throws IOException {
CryptFilter cf = getStmF();
if (coss_.compareVersion(1,5)>=0) {
Dict dp = (Dict)coss_.getDecodeParms(stream, "Crypt");
String name = dp!=null? (String)coss_.getObject(dp.get("Name")): null;
if (name!=null) cf = getCryptFilter(name);
}
return cf;
}
COM: <s> returns crypt filter to use for var stream var </s>
|
funcom_train/28669393 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MutableString delete(int start, int end) {
if (start < 0)
throw new StringIndexOutOfBoundsException(start);
if (end > count)
end = count;
if (start > end)
throw new StringIndexOutOfBoundsException();
int len = end - start;
if (len > 0) {
System.arraycopy(value, start+len, value, start, count-end);
count -= len;
}
return this;
}
COM: <s> removes the characters in a substring of this sequence </s>
|
funcom_train/40626905 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean removeDomain(Domain aDomain, AsyncCallback<Void> aCallback) {
//remove the domain (all domain registrations)
boolean isRemoved = (myDomainListenerMapping.remove(aDomain) != null);
if(isRemoved) {
schedule(new DeactivationCommand(getRemoteEventConnector(), aDomain, aCallback));
if(myDomainListenerMapping.isEmpty()) {
reset();
}
}
return isRemoved;
}
COM: <s> removes the domain with all listener registrations to the domain </s>
|
funcom_train/12127261 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PBounds getUnionOfLayerFullBounds() {
PBounds result = new PBounds();
int count = getLayerCount();
for (int i = 0; i < count; i++) {
PLayer each = (PLayer) layers.get(i);
result.add(each.getFullBoundsReference());
}
return result;
}
COM: <s> return the total bounds of all the layers that this camera looks at </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.