__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/37571546 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getConfirmationContent() throws Exception {
SOAPBody body = m_envelope.getBody();
SOAPElement element = findChild(body, "filing:FilingConfirmations");
if (element != null)
return makeStringFromBranch(element);
else
throw new NullPointerException("OXCISOAPMessageWrapper.getConfirmationContent() was not able to find the filing confirmation element in the SOAP body.");
}
COM: <s> get the xml from my filing confirmation element if any </s>
|
funcom_train/19590531 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAction( InputActionInterface inputAction ) {
synchronized ( this ) {
if (allTriggers!=null)
{
for ( int i = allTriggers.size() - 1; i >= 0; i-- ) {
ActionTrigger trigger = allTriggers.get( i );
if ( trigger.action == inputAction ) {
trigger.remove();
//go on, action could be in more triggers
}
}
}
}
}
COM: <s> removes a keyboard input action from the list of key actions that are </s>
|
funcom_train/1280440 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void connectionLost() {
setState(STATE_LISTEN);
// Send a failure message back to the Activity
Message msg = mHandler.obtainMessage(BluetoothChat.MESSAGE_TOAST);
Bundle bundle = new Bundle();
bundle.putString(BluetoothChat.TOAST, "Device connection was lost");
msg.setData(bundle);
mHandler.sendMessage(msg);
}
COM: <s> indicate that the connection was lost and notify the ui activity </s>
|
funcom_train/5536604 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetStateName() {
System.out.println("getStateName");
Transceiver instance = new TransceiverImpl();
String expResult = "MyMy HeyHey";
instance.setStateName("MyMy HeyHey");
String result = instance.getStateName();
assertEquals(expResult, result);
}
COM: <s> test of set state name method of class adhoc </s>
|
funcom_train/5463288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String recentTokens() {
StringBuffer trace = new StringBuffer();
for (int i = priorTokens.size()-1; i >= 0; i--) {
trace.append(priorTokens.get(i));
trace.append(" ");
}
return trace.toString();
}
COM: <s> return a trace of the recently seen tokens for use </s>
|
funcom_train/32913677 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadCache() throws Exception {
refmap.clear();
Runnable loader = new Runnable() {
public void run() {
try {
ReferenceList refs = rda.getAllReference();
Enumeration e1 = refs.elements();
while (e1.hasMoreElements()) {
ReferenceModel rm = (ReferenceModel) e1.nextElement();
refmap.put(rm.getRefId(), rm);
}
} catch (Exception ex) {
Debug.LogException(this, ex);
}
}
};
Thread t = new Thread(loader);
t.start();
t.join();
}
COM: <s> loads the entire cache </s>
|
funcom_train/17588318 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void HTMLizeJavaSrcFiles() {
if (!HTMLizedJavaSrcFiles) {
String srcPathName = Config.srcPathName;
if (srcPathName == null)
Messages.fatal(SRC_PATH_NOT_DEFINED);
String[] srcDirNames = srcPathName.split(Utils.PATH_SEPARATOR);
try {
Java2HTML java2HTML = new Java2HTML();
java2HTML.setMarginSize(4);
java2HTML.setTabSize(4);
java2HTML.setJavaDirectorySource(srcDirNames);
java2HTML.setDestination(Config.outDirName);
java2HTML.buildJava2HTML();
} catch (Exception ex) {
throw new RuntimeException(ex);
}
HTMLizedJavaSrcFiles = true;
}
}
COM: <s> converts and dumps the programs java source files specified by property </s>
|
funcom_train/12195213 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPID() throws Exception {
ValidationHelper.checkPID("a");
ValidationHelper.checkPID("a.b");
ValidationHelper.checkPID("a0-_");
checkFailingPID(null);
checkFailingPID("");
checkFailingPID("a/b");
checkFailingPID("a..b");
}
COM: <s> ensure that pid validation works correctly </s>
|
funcom_train/16476126 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireElementCreatedEvent(BenchmarkElement e) {
// System.out.println("Fire ElementCreatedEvent: " + e.toString()); // DEBUG
final BenchmarkElementEvent event = new BenchmarkElementEvent (e);
fireEvent(
new EventHandler<BenchmarkElementEvent>(event) {
@Override
protected void dispatch(ElementEventListener listener, BenchmarkElementEvent event)
{
listener.elementCreated(event);
}
});
}
COM: <s> fire an event to note that the given element was created </s>
|
funcom_train/43282614 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IModelInputOutput findModelIO(ModelPart modelPart) {
Class class_ = (Class) implementationBaseClassCorrelation.get(modelPart
.getClass());
if (class_ != null) {
Object[] cInfos;
for (int i = 0; i < MODEL_TYPES.length; i++) {
cInfos = (Object[]) MODEL_TYPES[i];
if (cInfos[0] == class_) {
return (IModelInputOutput) cInfos[1];
}
}
}
return null;
}
COM: <s> find the model io for a certain model </s>
|
funcom_train/28754272 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPosthybstopdate(String newVal) {
if ((newVal != null && this.posthybstopdate != null && (newVal.compareTo(this.posthybstopdate) == 0)) ||
(newVal == null && this.posthybstopdate == null && posthybstopdate_is_initialized)) {
return;
}
this.posthybstopdate = newVal;
posthybstopdate_is_modified = true;
posthybstopdate_is_initialized = true;
}
COM: <s> setter method for posthybstopdate </s>
|
funcom_train/20128791 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getColumn(int position) throws SQLException {
if (position <= column.length) {
return column[position - 1];
} else {
final SqlExceptionState state = SqlExceptionState.COLUMN_NOT_FOUND;
throw new SQLException("The resultset contains only " + String.valueOf(column.length) + " column(s).", state.name(), state.code());
}
}
COM: <s> returns the designated columns name </s>
|
funcom_train/12168978 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reportNotification(Notification notification) {
if (notification.getType() == NotificationType.ERROR) {
System.err.println("ERROR " + notification.getMessage());
} else if (notification.getType() == NotificationType.INFO) {
System.out.println(notification.getMessage());
} else {
throw new IllegalStateException("unknown notification type");
}
}
COM: <s> reports the specified notification by printing its message to the </s>
|
funcom_train/20303661 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setLocalName(String uri) {
if (uri == null || uri.equals(""))
localName = "";
else
// try
{
IRI u = BaseXMLWriter.factory.create(uri);
u = u.create("");
localName = u.toString();
}
// catch (MalformedURIException e) {
// throw new BadURIException(uri, e);
// }
}
COM: <s> note must work with uri being null </s>
|
funcom_train/17201992 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initForArch(IR ir) {
PhysicalRegisterSet phys = ir.regpool.getPhysicalRegisterSet();
// We reserve the last (bottom) slot in the FPR stack as a scratch register.
// This allows us to do one push/pop sequence in order to use the
// top of the stack as a scratch location
phys.getFPR(7).reserveRegister();
}
COM: <s> initialize some architecture specific state needed for register </s>
|
funcom_train/12781310 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean visitBlockExprAssignOp(CAstNode n, CAstNode v, CAstNode a, boolean pre, C c, CAstVisitor<C> visitor) {
return delegate.visitBlockExprAssignOp(n, v, a, pre, c, visitor);
}
COM: <s> visit a block expr op assignment node after visiting the rhs </s>
|
funcom_train/43098505 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object buildCallAction(Object oper, String name) {
if (!(oper instanceof MOperation)) {
throw new IllegalArgumentException(
"There should be an operation" + " with a callaction.");
}
Object action = createCallAction();
nsmodel.getCoreHelper().setName(action, name);
nsmodel.getCommonBehaviorHelper().setOperation(action, oper);
return action;
}
COM: <s> builds a call action belonging to operation oper with a given name </s>
|
funcom_train/175336 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getTaskCount() {
synchronized (mainLock) {
long n = completedTaskCount;
for (Iterator itr = workers.iterator(); itr.hasNext();) {
Worker w = (Worker)itr.next();
n += w.completedTasks;
if (w.isActive())
++n;
}
return n + workQueue.size();
}
}
COM: <s> returns the approximate total number of tasks that have been </s>
|
funcom_train/22397569 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void invoke(MethodInvocation mi) {
for (int i = 0; i < getNumberOfExpectations(); i++) {
getExpectation(i).invoke(mi);
if (mi.isEvaluated()) {
return;
}
if (this.isStrict) {
try {
getExpectation(i).verify();
} catch (HammockException he) {
setVerificationException(new HammockException(mi
.getMethod(), METHOD_INVOKED_OUT_OF_SEQUENCE));
}
}
}
this.setVerificationException(new HammockException(mi.getMethod(),
METHOD_CANNOT_BE_EVALUATED));
}
COM: <s> called by a test double when a method is invoked </s>
|
funcom_train/46937850 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void transferData(PushBufferStream stream) {
try {
stream.read(readBuffer);
} catch (Exception e) {
System.out.println(e);
return;
}
// Just in case contents of data object changed by some other thread
Buffer inBuffer = (Buffer) (readBuffer.clone());
inBuffer.setFlags(readBuffer.getFlags() | Buffer.FLAG_NO_SYNC);
// Check for end of stream
if (readBuffer.isEOM()) {
System.out.println("End of stream");
return;
}
// Do useful stuff or wait
useFrameData(inBuffer);
}
COM: <s> this will get called when theres data pushed from the </s>
|
funcom_train/16791584 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void doHelp() {
StringBuilder builder = new StringBuilder(256);
for (int i = 0; i < this.COMMAND_TABLE.length; i++) {
builder.append(this.COMMAND_TABLE[i].getHelpLine());
builder.append('\n');
}
this.result.setText(builder.toString());
}
COM: <s> print a help description </s>
|
funcom_train/12276452 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String readString(String charset) throws IOException {
long len = readInt();
if(len > available())
throw new IOException("Cannot read string of length " + len
+ " bytes when only " + available()
+ " bytes are available");
byte[] raw = new byte[ (int) len];
readFully(raw);
if (encode) {
return new String(raw, charset);
}
else {
return new String(raw);
}
}
COM: <s> read a string from the array converting using the given character set </s>
|
funcom_train/49426129 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void gotoScreen(final String id) {
log.info("gotoScreen [" + id + "]");
if (gotoScreenInProgess) {
return;
}
gotoScreenInProgess = true;
if (currentScreen.isNull()) {
gotoScreenInternal(id);
} else {
// end current screen
currentScreen.endScreen(
new EndNotify() {
public void perform() {
gotoScreenInternal(id);
}
});
}
}
COM: <s> goto screen command </s>
|
funcom_train/28104533 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Configuration buildConfiguration(String filename) {
InputStream in;
Configuration conf;
try {
File fp = new File(filename);
in = new FileInputStream(fp);
} catch(IOException e) {
System.err.println("Error occurred opening file: "+e.toString());
return null;
}
try {
conf = ConfigurationFactory.getConfiguration(in);
} catch(ConfigurationException e) {
System.err.println("Invalid configuration specified: "+
e.toString());
return null;
}
return conf;
}
COM: <s> takes a filename and performs the necessary wrapping and testing </s>
|
funcom_train/35882946 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void BeforeNavigate2(Variant[] args) {
String url = args[1].toString();
if (LOG.isDebugEnabled())
LOG.debug("BeforeNavigate2 " + url);
setDocumentDone(false);
final CountDownLatch documentCompleteLatch = this.documentCompleteLatch;
if (documentCompleteLatch != null) {
if (documentCompleteLatch.getCount() != 0) {
documentCompleteLatch.countDown();
}
}
this.documentCompleteLatch = new CountDownLatch(1);
}
COM: <s> fires before navigation occurs in the given object on either a window or </s>
|
funcom_train/8687040 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getValue() {
if (values.size() == 0) {
return null;
}
String fullValue = "";
for (Enumeration e = getValues(); e.hasMoreElements();) {
String value = (String) e.nextElement();
fullValue += value + " ";
}
return fullValue.trim();
}
COM: <s> get the attributes value </s>
|
funcom_train/5711962 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetSerialNumberC1() throws Exception{
RCapi capi = new RCapi();
String serialNumber = capi.getSerialNumber(1);
assertNotNull("check existance of serial number");
assertTrue("check length of serial number not being 0", serialNumber.trim().length() != 0);
System.out.println("Serial Number of Controller 1: " + serialNumber);
}
COM: <s> tests the retrieval of the serial number of the controller nr </s>
|
funcom_train/16818470 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MethodDecomposer getNextMethod() {
if (methods == null) {
curr_method = 0;
methods = cl.getDeclaredMethods();
if (methods == null) num_methods = 0;
else num_methods = methods.length;
}
if (curr_method < num_methods) {
Method m = methods[curr_method];
curr_method++;
return new MethodDecomposer(m);
} else {
return null;
}
}
COM: <s> return a method decomposer assosciated with the next method </s>
|
funcom_train/34799955 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String apply() {
try {
confControl.setRegistrationEnabled(registrationEnabled);
setAlert("Registration stage modification completed!", "", "success");
} catch (Exception ex) {
setAlert(
"Registration stage modification failed. " + ex.getMessage(),
"First, set up the price configurations!",
"error");
}
return null; //do not navigate away
}
COM: <s> applies the configuration modifications </s>
|
funcom_train/6333535 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void thisToReal(){
m_real_song.setTitle (this.getTitle());
m_real_song.setAuthor (this.getAuthor());
m_real_song.setCopyright (this.getCopyright());
m_real_song.setPublisher (this.getPublisher());
}
COM: <s> moves data values from this transient store to the associated </s>
|
funcom_train/48595419 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sessionEventOccurred(SessionEvent e) {
if(e.getType() == SessionEvent.SESSION_TERMINATED_SUCCESS) {
sessionsLock.lock();
try {
if(sessions.remove(e.getSource())) {
System.err.println("Session " + e.getSource() + " finished.");
}
} finally {
sessionsLock.unlock();
}
}
}//sessionEventOccurred
COM: <s> handle an event from a session </s>
|
funcom_train/6269059 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent ae) {
Object source = ae.getSource();
if (source == okButton ||
source == nameTf ||
source == addressTf) {
String name = nameTf.getText().trim();
String address = addressTf.getText().trim();
if (isEditing) {
model.editData(dataRow, name, address);
}
else {
if (!name.equals("") || !address.equals("")) {
model.addData(name, address);
}
}
}
dispose();
}
COM: <s> takes care of actions </s>
|
funcom_train/14461672 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setName(String name){
// ptgId = 0x43;
ptgId = 0x23; // 20060126 - KSC: Excel seems to need this code to recognize name
record = new byte[5];
record[0] = ptgId;
WorkBook b = this.getParentRec().getSheet().getWorkBook();
ilbl = b.getNameNumber(name);
record[1] = (byte)ilbl;
}
COM: <s> for creating a ptg name from formula parser </s>
|
funcom_train/44704944 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ContentPage clonePage(int count, Folder parent) {
ContentPage page = (ContentPage)super.cloneItem(count, parent, false);
page.setTitle(page.getName());
page.save();
Category cat = getRandomCategory();
cat.addChild(page);
cat.save();
return page;
}
COM: <s> assing pages to random categories </s>
|
funcom_train/31127108 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MMXRegulatedMotor (NXTMMX mux, int motor){
super(mux, motor);
MOTOR_MAX_DPS=(int)(mux.getVoltage()*100);
// start the tachomonitor
Thread monitorThread;
monitorThread = new Thread(this.tachoMonitor);
monitorThread.setDaemon(true);
monitorThread.start();
}
COM: <s> create an instance of a code mmxregulated motor code </s>
|
funcom_train/29842916 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeSeries(final XYSeries series) {
// check arguments...
if (series == null) {
throw new IllegalArgumentException("Null 'series' argument.");
}
// remove the series...
if (this.data.contains(series)) {
series.removeChangeListener(this);
this.data.remove(series);
if (this.data.size() == 0) {
this.xPoints.clear();
}
this.intervalDelegate.seriesRemoved();
fireDatasetChanged();
}
}
COM: <s> removes a series from the collection and sends a </s>
|
funcom_train/43626480 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSortOrder(Object identifier, SortOrder sortOrder) {
if (!hasSortController())
return;
TableColumn columnExt = getColumnByIdentifier(identifier);
if (columnExt == null)
return;
getSortController().setSortOrder(columnExt.getModelIndex(), sortOrder);
}
COM: <s> sorts the table by the given column using the sort order </s>
|
funcom_train/13210900 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: synchronized protected int removeMessagesWithClientId(int id) {
int num=0;
for (int i=msgBuffer.size()-1;i>=0;i--) {
String m=(String)msgBuffer.get(i);
if (getClientIdOfMessage(m)==id) {
msgBuffer.remove(i);
num++;
}
}
return num;
}
COM: <s> removes all messages with the given id from the buffer </s>
|
funcom_train/50054132 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addSnowParticle(RenderableParticle snowParticle) {
snowParticles.add(snowParticle);
Tuple3f position = snowParticle.getParticle().getPosition();
Rectangle worldBound = Config.getInstance().getWorldBound();
UV_POSITION.set(position.x - worldBound.x,
position.z - worldBound.y);
UV_POSITION.x /= worldBound.width;
UV_POSITION.y /= worldBound.height;
verts.put(UV_POSITION.x);
verts.put(UV_POSITION.y);
}
COM: <s> adds a snow culmulating particle </s>
|
funcom_train/7342050 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getPageList() {
if (index * pageSize > size()) {
return subList((index - 1) * pageSize, size());
} else {
return subList((index - 1) * pageSize, ((index - 1) * pageSize) + pageSize);
}
}
COM: <s> gets a list that represents a page in the paged list </s>
|
funcom_train/36012350 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fillReviewFileTable() {
for (int i = 0; i < this.reviewIFiles.length; i++) {
TableItem item = new TableItem(this.reviewFileTable, SWT.NONE);
item.setText(reviewIFiles[i].getProjectRelativePath().toString());
}
}
COM: <s> fills review file table with review id files </s>
|
funcom_train/3722793 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showErrorMessage(String message, String title, Exception ex) {
getMessagePane().addMessage(message, "error", 10);
JOptionPane.showMessageDialog(this,
message,
title,
JOptionPane.ERROR_MESSAGE);
}
COM: <s> show this error message </s>
|
funcom_train/27836526 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getExitMenuItem() {
if (exitMenuItem3 == null) {
exitMenuItem3 = new JMenuItem();
exitMenuItem3.setText("Exit");
exitMenuItem3
.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
notifyObservers(new ExitCommand());
}
});
}
return exitMenuItem3;
}
COM: <s> this method initializes exit menu item3 </s>
|
funcom_train/37248267 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void take(Simulation sim, PhysicalSystem ps) {
// Retrieve the particle.
i = ps.iterator();
b = (Ball) i.next();
// Calculate and store the time, energy and position characterisics
// of the simulation at the time the measurement is taken.
setTime(sim.getTime());
setPotentialEnergy(9.8 * b.getY());
setKineticEnergy(0.5 * b.getVy() * b.getVy());
setTotalEnergy(getKineticEnergy() + getPotentialEnergy());
setY(b.getY());
}
COM: <s> this method use the private methods to calculate and store </s>
|
funcom_train/3172979 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private char getMappingCode(char c) {
if (!Character.isLetter(c)) {
return '0';
} else {
int loc = Character.toUpperCase(c) - 'A';
if (loc < 0 || loc > (soundexMapping.length - 1))
return '0';
return soundexMapping[loc];
}
}
COM: <s> used internally by the sound ex algorithm </s>
|
funcom_train/32636231 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSmallDataLength() {
int dataLen = PARTITION_LENGTH / 3;
byte[] data = new byte[dataLen];
Arrays.fill(data, (byte)7);
wu.setData(data);
wu.save();
reinitializeHibernate();
wu = WorkUnit.findAll()[0];
byte[] savedData = wu.getData();
assertTrue(savedData.length == dataLen);
for (byte datum : savedData) {
assertTrue(datum == (byte)7);
}
}
COM: <s> tests saving data with 1 length partition length </s>
|
funcom_train/3749324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getMailHostSMTP() {
if (logger.isDebugEnabled()) {
logger.debug("getMailHostSMTP() - start");
}
if (logger.isDebugEnabled()) {
logger.debug("getMailHostSMTP() - end - return value = "
+ mailHostSMTP);
}
return mailHostSMTP;
}
COM: <s> name or ip address of the host used to send mail messages </s>
|
funcom_train/46458674 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFrameNumber(int n) {
super.setFrameNumber(n);
int index = Math.min(getFrameNumber(), images.length-1);
rawImage = images[index];
isValidImage = false;
isValidFilteredImage = false;
firePropertyChange("framenumber", null, new Integer(getFrameNumber())); //$NON-NLS-1$
}
COM: <s> overrides video adapter set frame number method </s>
|
funcom_train/15616920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeFromCacheCaseInsensitive(String key) {
for (Object cacheKey : this.getCache().getKeys()) {
// with the upgrade to ehcache 2.4.2 it seems that null cache keys are possible...
if (cacheKey != null && cacheKey.toString().equalsIgnoreCase(key)) {
this.getCache().remove(cacheKey);
}
}
}
COM: <s> remove a key from the cache in a case insensitive manner </s>
|
funcom_train/20079383 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInput(final Object input) {
contentProvider.inputChanged(this, this.input, input);
IStructuredContentProvider cp = (IStructuredContentProvider) contentProvider;
cp.getElements(input, new IAsyncContentCallback() {
public void setElements(Object[] elems) {
elements = elems;
onInputReceived(input);
}
});
this.input = input;
}
COM: <s> sets the viewers input </s>
|
funcom_train/5346246 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getAmountRead() {
VerifyingFile ourFile;
synchronized(this) {
if ( state == CORRUPT_FILE )
return corruptFileBytes;
else if ( state == HASHING ) {
if ( incompleteFile == null )
return 0;
else
return URN.getHashingProgress(incompleteFile);
} else {
ourFile = commonOutFile;
}
}
return ourFile == null ? 0 : ourFile.getBlockSize();
}
COM: <s> return the amount read </s>
|
funcom_train/15686032 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getTacticStrength(Lineup lineup, int tacticType) {
double tacticLevel = 1d;
switch (tacticType) {
case IMatchDetails.TAKTIK_KONTER:
tacticLevel = lineup.getTacticLevelCounter();
break;
case IMatchDetails.TAKTIK_MIDDLE:
tacticLevel = lineup.getTacticLevelAimAow();
break;
case IMatchDetails.TAKTIK_PRESSING:
tacticLevel = lineup.getTacticLevelPressing();
break;
case IMatchDetails.TAKTIK_WINGS:
tacticLevel = lineup.getTacticLevelAimAow();
break;
case IMatchDetails.TAKTIK_LONGSHOTS:
tacticLevel = lineup.getTacticLevelLongShots();
break;
}
tacticLevel -= 1;
return (int) Math.max(tacticLevel, 0);
}
COM: <s> get the tactic strength of the given lineup </s>
|
funcom_train/1733705 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RankableItem fromArticle(Article article) {
ItemInput iinput = RSSFetchService.getService().getItemInput();
Object[] items = iinput.getItems();
for (int i = 0; i < items.length; i++) {
RankableItem ritem = (RankableItem) items[i];
if (ritem.getArticle().getId() == article.getId())
return ritem;
}
return null;
}
COM: <s> mapping from article to rankableitem </s>
|
funcom_train/22020549 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String isoEnc(String s) {
try {
String r = MimeUtility.encodeText(s, rgs("XML.CharSet"), null);
return r;
} catch (java.io.UnsupportedEncodingException uee) {
logger.logp(Level.WARNING, this.toString(), "isoEnc (String)", uee.toString(), uee);
return "";
}
}
COM: <s> method that takes a string and encodes it to iso 8859 15 </s>
|
funcom_train/36920848 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected File addFile(String name, String hash) {
if (!super.validateName(name))
throw new IllegalArgumentException("File name must be a non-empty string not containing '/'");
if (!super.validateHash(hash))
throw new IllegalArgumentException("hash cannot be null");
if (this.containsFile(name))
throw new IllegalArgumentException("A file or directory with the requested name already exists.");
File file = new File(name, this.getPath(), hash);
this.children.add(file);
return file;
}
COM: <s> add a file as a child </s>
|
funcom_train/9294665 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setContent(Control content, boolean layout) {
checkWidget();
if (content != null && content.getParent() != this) {
SWT.error(SWT.ERROR_INVALID_ARGUMENT);
}
if (this.content != null && !this.content.isDisposed()) {
this.content.setBounds(OFFSCREEN, OFFSCREEN, 0, 0);
}
this.content = content;
if (layout)
layout();
}
COM: <s> sets the content </s>
|
funcom_train/7867312 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
return "Hi, i am a Mediator.\n "
+ "I contain a selection of " + iSelectedPeptideIdentifications.getNumberOfSpectra() + " spectra with PeptideIdentifcations.\n"
+ "(Iterator description: " + iSelectedPeptideIdentifications.getMeta(SelectedPeptideIdentifications.MK_ITERITOR_DESCRIPTION);
}
COM: <s> string representation of the mediator </s>
|
funcom_train/4814118 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent event) {
Object eventSource = event.getSource();
if (eventSource instanceof TileButton) {
handleTileButton((TileButton) eventSource);
}
else if (eventSource instanceof ExitButton) {
handleExitButton((ExitButton) eventSource);
}
else {
throw new UnsupportedOperationException(
"Can't handle events from a " + eventSource.getClass().getName());
}
}
COM: <s> handles players clicking tile buttons on the board </s>
|
funcom_train/16750909 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LineString toGeometry() {
GeometryFactory factory = new GeometryFactory();
CoordinateSequenceFactory csf = factory.getCoordinateSequenceFactory();
int len = nodes.size();
CoordinateSequence coords = csf.create(len, 2);
for (int i = 0; i < nodes.size(); i++) {
RoadNode node = nodes.get(i);
coords.setOrdinate(i, 0, node.lon);
coords.setOrdinate(i, 1, node.lat);
}
LineString lineString = factory.createLineString(coords);
return lineString;
}
COM: <s> get a jts representation of this road </s>
|
funcom_train/3815026 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void processFile(String inputAudioFile) throws FileNotFoundException {
audioSource
.setInputStream(new FileInputStream(inputAudioFile), "audio");
allFeatures = new LinkedList<float[]>();
getAllFeatures();
logger.info("Frames: " + allFeatures.size());
}
COM: <s> process the file and store the features </s>
|
funcom_train/9886593 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean validateParameters(ScriptTree tree, ErrorLog log) {
boolean isValid = true;
if(this.validator != null && this.validator.isEnabled()) {
if( ! (validator.validate(this, tree, log)) ) {
//REPORT ERRORS
log.reportAllListings();
isValid = false;
}
} else {
//Report validation disabled
isValid = false;
}
return isValid;
}
COM: <s> validates script for parameter rule violations of type or possibly </s>
|
funcom_train/14020456 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean processPointerEvent(MotionEvent evt,boolean downEvent,boolean useRightButton) {
return processPointerEvent((int)evt.getX(),(int)evt.getY(), evt.getAction(), evt.getMetaState(), downEvent, useRightButton);
}
COM: <s> convert a motion event to a format suitable for sending over the wire </s>
|
funcom_train/43667191 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getClose() {
if (close == null) {
close = new JButton();
close.setBounds(new Rectangle(450, posY + 10, 105, 22));
close.setText("Ok");
close.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
dispose();
}
});
}
return close;
}
COM: <s> this method initializes close </s>
|
funcom_train/15607737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Range calculateFeatureRange() {
Range.Orientation lOrientation = (getStart() <= getEnd()) ? Range.FORWARD_ORIENTATION : Range.REVERSE_ORIENTATION;
int lMagnitude = Math.abs(getEnd() - getStart());
return new Range(getStart(), lMagnitude, lOrientation);
} // End method
COM: <s> returns the range covered by this compound feature </s>
|
funcom_train/9238058 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean callPrivateCTCPReply(final String sType, final String sMessage, final String sHost) {
final CallbackOnPrivateCTCPReply cb = (CallbackOnPrivateCTCPReply)getCallbackManager().getCallbackType("OnPrivateCTCPReply");
if (cb != null) { return cb.call(sType, sMessage, sHost); }
return false;
}
COM: <s> callback to all objects implementing the private ctcpreply callback </s>
|
funcom_train/27738874 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void cancelUDPFailover(byte[] clientGUID) {
synchronized (UDP_FAILOVER) {
byte[] key = clientGUID;
AtomicInteger requests = UDP_FAILOVER.get(key);
if (requests != null) {
if (requests.decrementAndGet() <= 0)
UDP_FAILOVER.remove(key);
}
}
}
COM: <s> removes data from udp failover indicating a push has used it </s>
|
funcom_train/33280803 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addRequestHeader(final String name, final String value) {
if ("cookie".equalsIgnoreCase(name)) {
throw new IllegalArgumentException("Do not add 'Cookie' header, use .getCookieManager() instead");
}
requestHeaders_.put(name, value);
}
COM: <s> adds a header which will be sent with every request from this client </s>
|
funcom_train/28122821 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeVisualiser(Visualiser v) {
v.hideProperties(); // hide properties window
v.removeConnections(); // remove connections to visualiser
modelPane.remove((java.awt.Component)v); // remove visualiser from pane
Visualisers.remove(v); // remove visualiser from list of visualisers
refresh();
setChanged();
}
COM: <s> remove a visualiser and its connections from the model </s>
|
funcom_train/5823868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int convertSecurityLevel(int securityLevel) {
switch (securityLevel) {
case SnmpAgentConfig.AUTH_NOPRIV :
securityLevel = SecurityLevel.AUTH_NOPRIV;
break;
case SnmpAgentConfig.AUTH_PRIV :
securityLevel = SecurityLevel.AUTH_PRIV;
break;
case SnmpAgentConfig.NOAUTH_NOPRIV :
securityLevel = SecurityLevel.NOAUTH_NOPRIV;
break;
default :
securityLevel = SecurityLevel.NOAUTH_NOPRIV;
}
return securityLevel;
}
COM: <s> this method adapts the open nms snmpv3 security level constants </s>
|
funcom_train/12158462 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testObject() {
MostSpecificClassMap map = new MostSpecificClassMap();
map.put(Object.class, "Object");
assertEquals("Object", map.get(Object.class));
assertEquals("Object", map.get(String.class));
assertEquals("Object", map.get(Integer.class));
}
COM: <s> test that if the map contains only the object </s>
|
funcom_train/4681267 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean hasGroup(String groupname) {
// Does he/she have any groups at all?
if (userGroups == null) {
return false;
// Loop the groups
}
for (int i = 0; i < userGroups.length; i++) {
// Does he have it?
if (userGroups[i].equals(groupname)) {
return true;
}
}
return false;
}
COM: <s> check if the current user is member of this group </s>
|
funcom_train/14027468 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAnnotations(Annotation[] ann) throws IOException {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
baos.write(Types.bytesFromShort((short)ann.length));
for(int i = 0; i < ann.length; ++i) {
ann[i].writeToByteArrayOutputStream(_constantPool,baos);
}
setData(baos.toByteArray());
}
COM: <s> set the annotations list </s>
|
funcom_train/3862068 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String map(String value) {
try {
cContainsFirstStatement.setString(1, value);
ResultSet mResults = cContainsFirstStatement.executeQuery();
if (mResults.next()) {
return mResults.getString("second");
}
else {
return null;
}
}
catch (SQLException e) {
cLogger.error("", e);
return null;
}
}
COM: <s> a weird outlier of a method this provides the same functionality </s>
|
funcom_train/12564560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void rendered() {
if (lastRenderedTile == null) {
lastRenderedTile = lrtCache;
}
lastRenderedTile.x = rTile.x;
lastRenderedTile.y = rTile.y;
lastRenderedTile.maxX = rTile.maxX;
lastRenderedTile.maxY = rTile.maxY;
}
COM: <s> should be called by model node implementations when they have just </s>
|
funcom_train/25823133 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static private String getProtocol(TreeNode[] nodes) {
String result = new String();
result = "(" + nodes[0].protocol + ")";
for (int i = 1; i < nodes.length; ++i) {
result += "; (" + nodes[i].protocol + ")";
}
return result;
}
COM: <s> this method is obsolete and used only for debuging the protocol is </s>
|
funcom_train/50257452 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(IFileEditorInput input,String source){
super.update(input,source);
cunstomTagList.clear();
namespace.clear();
JSPInfo jspInfo = JSPInfo.getJSPInfo(input.getFile(),source);
TLDInfo[] tlds = jspInfo.getTLDInfo();
for(int i=0;i<tlds.length;i++){
namespace.put(tlds[i].getPrefix(),tlds[i].getTaglibUri());
cunstomTagList.addAll(tlds[i].getTagInfo());
}
}
COM: <s> updates informations about code completion </s>
|
funcom_train/19318231 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setByte(String name, byte value) throws JMSException {
if(isBodyModifiable()) {
try {
map.put(name, new Byte(value));
}
catch(NullPointerException e) {
throw new JMSException(e.getMessage());
}
}
else {
throw new MessageNotWriteableException("MapMessage read_only");
}
}
COM: <s> sets a code byte code value with the specified name into the map </s>
|
funcom_train/43358320 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean implementsCommonInterface(String name) {
try {
JavaClass cls = Repository.lookupClass(name);
JavaClass[] infs = cls.getAllInterfaces();
for (JavaClass inf : infs) {
String infName = inf.getClassName();
if (ignorableInterfaces.contains(infName)) {
continue;
}
if (infName.startsWith("java.")) {
return true;
}
}
return false;
} catch (ClassNotFoundException cnfe) {
bugReporter.reportMissingClass(cnfe);
return true;
}
}
COM: <s> return whether or not a class implements a common or marker interface </s>
|
funcom_train/23297187 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Color getCladeLabelColor() {
Element nameElem = Forest.getFirstElementByTagName(this.fClade,
CLADE_NAME_IDENTIFIER);
if ( nameElem == null )
return getCladeBranchColor();
String attrColor = nameElem.getAttribute(CLADE_FONT_COLOR);
if ( attrColor == "" )
return getCladeBranchColor();
else
return GraphicsUtils.getColor(attrColor);
}
COM: <s> gets the clade label paint </s>
|
funcom_train/33337567 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init() {
templateImageLoader.init();
specificationLoader.setServiceClasses(JavaClassUtils.toClasses(serviceList));
specificationLoader.init();
// must come after init of spec loader.
specificationLoader.injectInto(persistenceSessionFactory);
persistenceSessionFactory.setServices(serviceList);
userProfileLoader.setServices(serviceList);
authenticationManager.init();
authorizationManager.init();
persistenceSessionFactory.init();
}
COM: <s> wires components as necessary and then </s>
|
funcom_train/14059515 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void preferencesChanged(final PreferencesChangedEvent event) {
if (event.getSource() == this.m_p) {
if (event.hasChanged(this.m_textKey)) {
this.setTitle(this.m_p.get(this.m_textKey, null));
this.invalidate();
this.validate();
}
}
}
COM: <s> a preference has been changed </s>
|
funcom_train/28116842 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Message create() throws Exception {
MessageTestCase test = (MessageTestCase) getTest();
TestContext context = getContext();
Session session = context.getSession();
MessageCreator creator = new MessageCreator(
session, test.getMessagePopulator());
return creator.create(_type);
}
COM: <s> create a message to test against corresponding to the type </s>
|
funcom_train/15837641 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton1() {
if (jButton1 == null) {
jButton1 = new JButton();
jButton1.setText("Mount");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
MountOptions mo = new MountOptions(MiniGUIStart.this.jFrame);
mo.setModal(true);
mo.setVisible(true);
}
});
}
return jButton1;
}
COM: <s> this method initializes j button1 </s>
|
funcom_train/43261098 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getOkCommand2() {
if (okCommand2 == null) {//GEN-END:|144-getter|0|144-preInit
// write pre-init user code here
okCommand2 = new Command("Kirjaudu sis\u00E4\u00E4n", Command.OK, 0);//GEN-LINE:|144-getter|1|144-postInit
// write post-init user code here
}//GEN-BEGIN:|144-getter|2|
return okCommand2;
}
COM: <s> returns an initiliazed instance of ok command2 component </s>
|
funcom_train/32157199 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public boolean isRealArray(IVariant v) throws EvaluationException {
if (!v.isArray1())
return false;
VArray a = (VArray)v;
for (int i = 0; i < a.getArraySize(); i++) {
if (!a.getArrayElement(i).isReal())
return false;
}
return true;
}
COM: <s> check if the variant is an array of real values </s>
|
funcom_train/21529269 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public InitialContext getInitialContext() {
try {
// Get InitialContext if it has not been gotten yet.
if (initCtx == null) {
// properties are in the system properties
initCtx = new InitialContext();
}
}
// Naming Exception will cause a null return.
catch (NamingException e) {}
return initCtx;
}
COM: <s> return the cached initial context </s>
|
funcom_train/27860653 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Level createLevel(int depth, double calt, double falt){
if (depth >= levels.length){
Level[] tmpL = new Level[depth+1];
System.arraycopy(levels, 0, tmpL, 0, levels.length);
levels = tmpL;
}
levels[depth] = new Level(calt, falt);
return levels[depth];
}
COM: <s> create a new level in the scene </s>
|
funcom_train/31208226 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNull(int parameterIndex, int sqlType) throws SQLException {
try {
if(Trace.isDetailed()) Trace.trace(getId(),parameterIndex+","+sqlType);
checkClosed();
adapter.setNull(this,parameterIndex,sqlType);
} catch(Throwable e) {
throw convertThrowable(e);
}
}
COM: <s> sets a parameter to null </s>
|
funcom_train/19309804 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUsingSystemFonts(final boolean using) {
if (this.setupCompleted) {
if (using != this.usingSystemFonts) {
getLogger().error("Font setup already completed. " +
"Ignoring setUsingFreeStandingFonts().");
}
return;
}
this.usingSystemFonts = using;
}
COM: <s> set parameter determining whether system fonts will be setup </s>
|
funcom_train/39846827 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createDefaultTopic() {
if (logger.isDebugEnabled()) {
logger.debug("createDefaultTopic() - start");
}
TopicDO defaultTopic = new TopicDO();
defaultTopic.setImage("");
getArticle().setTopic(defaultTopic);
if (logger.isDebugEnabled()) {
logger.debug("createDefaultTopic() - end");
}
}
COM: <s> create a default topic object and set it in the article </s>
|
funcom_train/14627409 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resetAllSimActions() {
for (int i=0; i<keyActions.length; i++) {
if (keyActions[i] != null) {
keyActions[i].reset();
}
}
for (int i=0; i<mouseActions.length; i++) {
if (mouseActions[i] != null) {
mouseActions[i].reset();
}
}
}
COM: <s> resets all sim actions so they appear like they havent </s>
|
funcom_train/37205270 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ActionListener getListener(Processor theProcessor) {
final APProcessor apProcessor = (APProcessor) theProcessor;
return new ActionListener() {
public void actionPerformed(ActionEvent ae) {
// If the workbench is present then create and display a new
// panel to configure the script engine.
UIUtils.createFrame(apProcessor.getModel(), new APConfigPanel(
apProcessor), 100, 100, 400, 500);
}
};
}
COM: <s> method for getting the listener for the editor </s>
|
funcom_train/22578794 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void process(BlockingQueue<Runnable> workerQueue, BlockingQueue<Error<Runnable>> errors) {
if (workerQueue == null) {
throw new IllegalArgumentException("workerQueue can't be null");
}
if (workerQueue.isEmpty()) {
logger.debug("Empty workerQueue");
return;
}
process(workerQueue.size(), workerQueue, errors);
}
COM: <s> process the queue with the number of threads equal to the queue size </s>
|
funcom_train/45544175 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IMethod findOverridingMethodInType(IType overridingType, IMethod overridden) throws JSCModelException {
IMethod[] overridingMethods= overridingType.getMethods();
for (int i= 0; i < overridingMethods.length; i++) {
if (isSubsignature(overridingMethods[i], overridden)) {
return overridingMethods[i];
}
}
return null;
}
COM: <s> finds an overriding method in a type </s>
|
funcom_train/32748563 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processSubsequences() throws GenerationException {
Iterator iterHware = this.m_lstSeq.iterator();
while (iterHware.hasNext()) {
AcceleratorSeq smfSeq = (AcceleratorSeq)iterHware.next();
ProxyTree pxySeq = new ProxyTree(smfSeq);
this.addChild(pxySeq);
}
}
COM: <s> creates code proxy tree code nodes for hardware objects representing </s>
|
funcom_train/1058670 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addForegroundColorPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_PBDiagram_foregroundColor_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_PBDiagram_foregroundColor_feature", "_UI_PBDiagram_type"),
PosterboardPackage.Literals.PB_DIAGRAM__FOREGROUND_COLOR,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the foreground color feature </s>
|
funcom_train/22449242 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getPosition(String aWord) {
boolean success = false;
int pos = 0;
for (int i = aWord.length(); i > 0; i--) {
try {
pos = findStartingWith(aWord.substring(0, i));
success = true;
break;
}
catch (ItemNotFoundException e) {
success = false;
}
}
if (!success) return fMap.size() - 1; // return last index
Object closest = null;
return pos;
}
COM: <s> return integer position of this word or near value </s>
|
funcom_train/43579974 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeGraphXMLToFile(ArrayList<Entity> entityList, String fileName){
if(!InputValidator.isInvalidString(fileName)){
File file = new File(fileName);
Writer output = null;
try {
output = new BufferedWriter(new FileWriter(file));
output.write(getGraphXML(entityList));
output.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
COM: <s> writes the xml file to the disk </s>
|
funcom_train/23057670 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JSlider getMinutejSlider() {
if (MinutejSlider == null) {
MinutejSlider = new JSlider();
MinutejSlider.setPreferredSize(new Dimension(240, 50));
MinutejSlider.setMajorTickSpacing(10);
MinutejSlider.setMinorTickSpacing(1);
MinutejSlider.setPaintTicks(true);
MinutejSlider.setValue(0);
MinutejSlider.setPaintLabels(true);
MinutejSlider.setName("Minutes");
MinutejSlider.setSnapToTicks(true);
MinutejSlider.setMaximum(59);
}
return MinutejSlider;
}
COM: <s> this method initializes minutej slider </s>
|
funcom_train/50616156 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private SSettingRowTextArea getSSettingRowTextArea() {
if (sSettingRowTextArea == null) {
sSettingRowTextArea = new SSettingRowTextArea();
sSettingRowTextArea.setLangLable(SLang.cPropWizard.KEY_COMMENT);
sSettingRowTextArea.setDBTextarea(oItem, ITabNames.KEY_COMMENT);
}
return sSettingRowTextArea;
}
COM: <s> this method initializes s setting row text area </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.