__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/4646141 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void _deselectAll(boolean notifyListeners) {
if (DEBUG)
System.out.println("clear"); //$NON-NLS-1$
this.selection = null;
this.selectionIndices = null;
if (items == null)
return;
for (int i = 0; i < items.length; i++) {
if (items[i] != null)
items[i]._deselectAll();
}
// Notify listeners if necessary.
if (notifyListeners)
notifySelectionListeners(null, -1, false);
}
COM: <s> deselects all items and send selection event depending on parameter </s>
|
funcom_train/12261513 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String createFileName(Font font) {
return font.getName().replace(" ", "").toLowerCase() + (font.isBold() ? "b" : "") + (font.isItalic() ? "i" : "") + ".exp0.tif";
}
COM: <s> creates file name </s>
|
funcom_train/1928428 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Local generateLocal(soot.Type type, String suggestedName){
//int i=0;
/*String name=suggestedName;
Set localNames=getLocalNames();
while (localNames.contains(name)) {
name=suggestedName + (++nextLocal);
}*/
String name=suggestedName + "$" + (id++);
//if (bodyContainsLocal(name))
// throw new RuntimeException("Name already exists: " + name);
return createLocal(name, type);
}
COM: <s> generate a local with a given type using a suggested name </s>
|
funcom_train/11648775 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Subject save(Subject subject) {
if (isSessionStorageEnabled(subject)) {
saveToSession(subject);
} else {
log.trace("Session storage of subject state for Subject [{}] has been disabled: identity and " +
"authentication state are expected to be initialized on every request or invocation.", subject);
}
return subject;
}
COM: <s> saves the subjects state to the subjects </s>
|
funcom_train/2287340 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void clearCaches() {
// flush all caches
OpenCms.getMemoryMonitor().flushLocales();
CmsResourceBundleLoader.flushBundleCache();
if (LOG.isDebugEnabled()) {
LOG.debug(Messages.get().getBundle().key(Messages.LOG_LOCALE_MANAGER_FLUSH_CACHE_1, "EVENT_CLEAR_CACHES"));
}
}
COM: <s> clears the caches in the locale manager </s>
|
funcom_train/3349778 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void invokeJavaMethod(VmMethod method) {
if (log) {
os.log("VStack: " + vstack + ", method: " + method);
}
helper.invokeJavaMethod(method);
// Test the stack alignment
stackFrame.writeStackAlignmentTest(getCurInstrLabel());
}
COM: <s> generate code to invoke the given method </s>
|
funcom_train/4417237 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JSONObject put(String key, Object value) throws JSONException {
if (key == null) {
throw new JSONException("Null key.");
}
if (value != null) {
testValidity(value);
this.map.put(key, value);
} else {
this.remove(key);
}
return this;
}
COM: <s> put a key value pair in the jsonobject </s>
|
funcom_train/3945977 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean validateTimelimitactionType_Enumeration(String timelimitactionType, DiagnosticChain diagnostics, Map context) {
boolean result = TIMELIMITACTION_TYPE__ENUMERATION__VALUES.contains(timelimitactionType);
if (!result && diagnostics != null)
reportEnumerationViolation(AdlcpRootv1p2Package.eINSTANCE.getTimelimitactionType(), timelimitactionType, TIMELIMITACTION_TYPE__ENUMERATION__VALUES, diagnostics, context);
return result;
}
COM: <s> validates the enumeration constraint of em timelimitaction type em </s>
|
funcom_train/2291230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setQuery(String query) {
// query = CmsEncoder.decode(query);
// for widget use the exception is thrown here to enforce the errmsg next to widget
if (query.trim().length() < getQueryLength()) {
throw new CmsIllegalArgumentException(Messages.get().container(
Messages.ERR_QUERY_TOO_SHORT_1,
new Integer(getQueryLength())));
}
m_query = query;
}
COM: <s> sets the query to search for </s>
|
funcom_train/5347868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConnectionsWithProxyOff() throws Exception {
ConnectionSettings.CONNECTION_METHOD.setValue(
ConnectionSettings.C_NO_PROXY);
fps.setProxyOn(false);
fps.setAuthentication(false);
fps.setProxyVersion(NONE);
Socket s = Sockets.connect("localhost",DEST_PORT,0);
//we should be connected to something, NPE is an error
s.close();
}
COM: <s> if proxy is off we should connect directly </s>
|
funcom_train/1797237 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInlineTransactions(Boolean inlineTransactions) {
if (inlineTransactions == null) {
inlineTransactions = false;
}
// check if setting to existing value
if (!this.inlineTransactions.equals(inlineTransactions)) {
// set to new value for customer parameter
this.inlineTransactions = inlineTransactions;
setStringCustomParameter("transactions",
!inlineTransactions ? null : inlineTransactions.toString());
}
}
COM: <s> sets the flag to inline transactions under the position feed </s>
|
funcom_train/32631883 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetFileName() {
System.out.println("-> testGetFileName");
String fileName = getDatabase().getFileName();
String path = getDatabase().getFilePath();
assertTrue("The fileName should be equals to the end of the file path", path.endsWith(fileName));
}
COM: <s> tests the retrieval of the databases filename </s>
|
funcom_train/3730348 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void dumpIList(String where) {
System.out.println("BytecodeCollector."
+ where + " instruction list:");
int i = 0;
for (InstructionHandle ih = ilist.getStart(); ih != null;
ih = ih.getNext() ) {
System.out.println( " " + (i++) + " " + ih.getInstruction());
}
}
COM: <s> dump the instruction list </s>
|
funcom_train/8012653 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isPrimaryKey(int col) throws DataStoreException {
if (col < 0 || _desc.getColumnCount() == 0)
throw new DataStoreException("Specified column (" + col + ") does not exist.");
DSColumnDescriptor c = _desc.getColumn(col);
return c.isPrimaryKey();
}
COM: <s> this method returns whether a column is part of the primary key </s>
|
funcom_train/36230762 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setIsHole(boolean p_IsHole) {
if (getNumInnerPoly() > 1) {
throw new IllegalStateException(
"Cannot call 'setIsHole' on a poly made up of more than one poly.");
}
//getInnerPoly(0).setIsHole(isHole);
m_IsHole = p_IsHole;
}
COM: <s> set whether or not this polygon is a hole </s>
|
funcom_train/12179901 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GridModifierState processEvent(ODOMChangeEvent event) {
GridModifierState newState = this;
if (--wait < 0) {
wait = 0;
}
if (wait == 0) {
// The waiting is over, so process the last event with the
// next state.
newState = nextState.processEvent(event);
}
return newState;
}
COM: <s> decrement the wait </s>
|
funcom_train/17897330 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DbConnection getConnection() throws Exception {
log().t(name,"getConnection");
synchronized (pool) {
for (DbConnection con : pool) {
if (!con.isUsed()) {
con.setUsed(true);
return new DbConnectionProxy(con);
}
}
DbConnection con = provider.createConnection();
if (con instanceof JdbcConnection) ((JdbcConnection)con).setPool(this);
pool.add(con);
con.setUsed(true);
return new DbConnectionProxy(con);
}
}
COM: <s> look into the pool for an unused db provider </s>
|
funcom_train/46758957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String callService(final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
StringBuffer sb = new StringBuffer(1024);
for (ProcessorStatus stat : getInterfaceController(call).getStatus()) {
sb.append(stat);
}
return sb.toString();
}}; return (String) call(method, call);
}
COM: <s> test the interface service </s>
|
funcom_train/2546882 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isPredecessor(WorkflowContentElementModel source, WorkflowContentElementModel target) {
Iterator iter = target.getTargetConnections().iterator();
while (iter.hasNext()) {
ConnectionModel c = (ConnectionModel) iter.next();
if (connectionsChecked.contains(c)) {
return false;
}
connectionsChecked.add(c);
if (source == c.getSource())
return true;
else {
if (isPredecessor(source, c.getSource()))
return true;
}
}
return false;
}
COM: <s> recursive method steping throught the ancestory of the </s>
|
funcom_train/35838823 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPermission(int permission) {
/*
if (nPermission == permission)
return ;
int oldValue = nPermission ;
nPermission = permission ;
// notify server to update database
IUserService userService = oModel.getUserService() ;
userService.setPermission(oSession, sId, sObjectId, oldValue, nPermission) ;
*/
}
COM: <s> sets the permission </s>
|
funcom_train/44011524 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetTransTotal() {
System.out.println("getTransTotal");
TransactionBO instance = new TransactionBO();
double expResult = 0.0;
double result = instance.getTransTotal();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get trans total method of class edu </s>
|
funcom_train/9822772 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Wire xor_o(Wire in, Wire out, String name) {
if (in.getWidth() == 1) {
return buf_o(in, out, name);
}
return xor_o(new Wire[] {in}, out, name);
}
COM: <s> constructs a new arbitrary number input xor gate </s>
|
funcom_train/18898852 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getRowCount() throws TuplesException {
if (rowCount != -1) {
return rowCount;
}
else if (isMaterialized()) {
return getRowUpperBound(); // Upper bound is accurate if tuples is materialized.
}
Tuples temp = (Tuples)this.clone();
rowCount = 0;
temp.beforeFirst();
while (temp.next()) {
rowCount++;
}
temp.close();
return rowCount;
}
COM: <s> gets the row count attribute of the abstract tuples object </s>
|
funcom_train/43245130 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetPatientDoB() {
System.out.println("setPatientDoB");
Calendar patientDoB = null;
PatientDemographicsDG1Object instance = new PatientDemographicsDG1Object();
instance.setPatientDoB(patientDoB);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set patient do b method of class org </s>
|
funcom_train/17386413 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean connecting(String server, int port) throws IOException, PluginException {
Enumeration<ConnectionPlugin> e = connectionPlugins.elements();
while (e.hasMoreElements()) {
ConnectionPlugin plugin = (ConnectionPlugin) e.nextElement();
if (((ConnectionCallback) plugin.getCallback()).connecting(server, port,
plugin.getData()) == false)
return false;
}
return true;
}
COM: <s> the bot is about to connect to a server but hasnt yet </s>
|
funcom_train/49848971 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean sameFlavour(Object o) {
if (o == null)
return false;
if (o == this)
return true;
if (o instanceof VariableDoubles)
return items.sameFlavour(((VariableDoubles)o).items);
if (o instanceof VariableItems)
return items.sameFlavour(((VariableItems)o));
else
return false;
}
COM: <s> compares the specified object with this variable doubles </s>
|
funcom_train/3133950 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void expire() throws IOException {
Set<SelectionKey> set = selector.keys();
if(cancel) {
long time = System.currentTimeMillis();
if(update <= time) {
for(SelectionKey key : set) {
expire(key, time);
}
update = time +10000;
}
}
}
COM: <s> this method is used to expire registered operations that remain </s>
|
funcom_train/34901388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleRequest(Request request, IRequestErrorHandler errorHandler) {
if(request instanceof GetTransitionListValidatorSetupRequest)
handleGetTransitionValidatorRequest((GetTransitionListValidatorSetupRequest)request, errorHandler);
else if (request instanceof TransitionValidatorRequest)
handleTransitionValidatorRequest((TransitionValidatorRequest)request, errorHandler);
else
errorHandler.handleRequestFailed(new SRMException(getErrorMessage()));
}
COM: <s> handles request to run transition validator picking on a project </s>
|
funcom_train/31625553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getPicklistMenu(String attribType) throws DBException {
if (attribType == null || attribType.length() == 0) {
return new ArrayList(0);
}
PickList pick = new PickList();
pick.setPickAttribType(attribType);
return (List) pick.searchAndRetrieveList(PickList.ORDER_NUM);
}
COM: <s> retrieve a list of valid value items for the picklist menu that </s>
|
funcom_train/45231391 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getInputArgumentLong(String formal_name) throws org.json.JSONException {
Argument argument = getInputArgument(formal_name);
long along = argument != null ? argument.getLongValue() : - 1L; // This is the "unspecified" value of VSMInt8 and VSMInt4
return along; // but not of VSMInt1! The whole approach needs some work.
}
COM: <s> gets the long represented by an argument in the input argument array assuming </s>
|
funcom_train/5512264 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void sendPacket(Vector3f positVector, float theta){
// send dataunits here
dataDISSender.transmitUpdate( positVector.x, positVector.z, -positVector.y, // translation
0.0f, 0.0f, theta, // orientation
0.0f, 0.0f, 0.0f, // no velocity
0.0f, 0.0f, 0.0f); // no angular velocity
}
COM: <s> used to send a dis packet to the vrml scene </s>
|
funcom_train/13391313 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ServiceResource getNext() throws NoSuchElementException {
ServiceResource sr = null;
if(list.size() == 0)
throw new NoSuchElementException("Empty resource list");
synchronized(list) {
sr = (ServiceResource)list.removeFirst();
if(sr != null)
list.addLast(sr);
}
return (sr);
}
COM: <s> returns the next code service resource code in the list of </s>
|
funcom_train/25484758 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Role getFirstRecursiveRole(final EntityRep entity) {
int count = 0;
Iterator itRoles = fRoles.iterator();
while(itRoles.hasNext()) {
Role role = ((Role)itRoles.next());
if (role.getEntity().equals(entity)) return role;
}
return null;
}
COM: <s> returns the first recursive role </s>
|
funcom_train/3091610 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeOutputFiles(String outputFolder) {
OutputWriter outputWriter;
outputWriter = new DefaultOutputWriter();
outputWriter.initialize(publicationManager.getPublications(),
authorManager.getAuthors(), topicManager.getTopics());
try {
outputWriter.writePajekFiles(outputFolder);
outputWriter.writeDataFiles(outputFolder);
System.out.println("Output Files written to the requested folder");
} catch (FileNotFoundException fnfe) {
System.err.println("Exception occurred : " + fnfe);
fnfe.printStackTrace();
}
}
COM: <s> writes the output files to the file system </s>
|
funcom_train/46320454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getString(Cursor cursor, String fieldName, String defaultValue) {
String result = null;
int columnIndex = nameToPosition.get(fieldName);
if (!cursor.isNull(columnIndex)) {
result = cursor.getString(columnIndex);
} else {
result = defaultValue;
}
return result;
}
COM: <s> get string value of field </s>
|
funcom_train/34620927 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void deleteInBackground(final List<ProjectViewNode> toBeDeleted) {
WorkspaceModifyOperation deletionOperation = createDeletionOperation(toBeDeleted);
try {
PlatformUI.getWorkbench().getProgressService().run(true, false, deletionOperation);
} catch (InvocationTargetException e) {
e.printStackTrace();
} catch (InterruptedException e) {
e.printStackTrace();
}
}
COM: <s> inside this method is the logic which fragments should be deleted from </s>
|
funcom_train/7801332 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OClass setSuperClass(final OClass iSuperClass) {
getDatabase().checkSecurity(ODatabaseSecurityResources.SCHEMA, ORole.PERMISSION_UPDATE);
final String cmd = String.format("alter class %s superclass %s", name, iSuperClass.getName());
getDatabase().command(new OCommandSQL(cmd)).execute();
setSuperClassInternal(iSuperClass);
return this;
}
COM: <s> set the super class </s>
|
funcom_train/46425044 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void computeByteArray(OSCJavaToByteArrayConverter stream) {
stream.write("#bundle");
computeTimeTagByteArray(stream);
Enumeration enumx = packets.elements();
OSCPacket nextElement;
byte[] packetBytes;
while (enumx.hasMoreElements()) {
nextElement = (OSCPacket) enumx.nextElement();
packetBytes = nextElement.getByteArray();
stream.write(packetBytes.length);
stream.write(packetBytes);
}
byteArray = stream.toByteArray();
}
COM: <s> compute the osc byte stream representation of the bundle </s>
|
funcom_train/20079794 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Widget findWidget(Element elem) {
int count = getWidgetCount();
for (int i = 0; i < count; i++) {
Widget w = getWidget(i);
if (DOM.isOrHasChild(w.getElement(), elem)) {
return w;
}
}
return null;
}
COM: <s> returns the widget whose element or child element matches the given </s>
|
funcom_train/2027879 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ComponentMonitor getComponentMonitor(){
return (ComponentMonitor)java.lang.reflect.Proxy.newProxyInstance(
getClass().getClassLoader(), new Class[]{ComponentMonitor.class},
new java.lang.reflect.InvocationHandler(){
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
return fire(method, args);
}
}
);
}
COM: <s> to create a component monitor instance that sequentially invoke </s>
|
funcom_train/6330312 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unlock() {
// If the current thread is locking, decrease the lock count.
// If the lock count is zero, release the lock, otherwise unlock()
// must be called again to release lock.
if (_lockThread == Thread.currentThread()) {
synchronized (this) {
--_lockCount;
if (_lockCount == 0) {
_lockThread = null;
notify();
}
}
}
}
COM: <s> releases a lock so other thread may gain access to the resource </s>
|
funcom_train/33371684 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createCTabFolder() {
cTabFolder = new CTabFolder(composite, SWT.NONE);
cTabFolder.addMouseListener(new org.eclipse.swt.events.MouseAdapter() {
public void mouseDoubleClick(org.eclipse.swt.events.MouseEvent e) {
System.out.println("mouseDoubleClick()");
}
});
}
COM: <s> this method initializes c tab folder </s>
|
funcom_train/20803339 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createFontRenderContext() {
RenderingHints renderHints = new RenderingHints (RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
renderHints.put (RenderingHints.KEY_RENDERING,RenderingHints.VALUE_RENDER_QUALITY);
Graphics2D g2d = (Graphics2D) getGraphics();
BufferedImage scratchImage = g2d.getDeviceConfiguration().createCompatibleImage (1, 1, Transparency.OPAQUE);
Graphics2D scratchg2d = scratchImage.createGraphics();
scratchg2d.setRenderingHints(renderHints);
this.fontRenderContext.set (scratchg2d.getFontRenderContext());
}
COM: <s> pre create a suitable font render context for text layout </s>
|
funcom_train/41821367 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute() {
// Get rA from register file
int rA = regs.read(regA); // rA <- RF
if(rA > 0) {
int immediate = lockReg.processImmediate(imm);
int pc = spr.getPc();
spr.writePc(pc + immediate);
branchTaken = true;
} else {
spr.incrementPc();
branchTaken = false;
}
}
COM: <s> executes the instruction </s>
|
funcom_train/48559277 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getOkCommand7() {
if (okCommand7 == null) {//GEN-END:|329-getter|0|329-preInit
okCommand7 = new Command("OK", Command.OK, 0);//GEN-LINE:|329-getter|1|329-postInit
}//GEN-BEGIN:|329-getter|2|
return okCommand7;
}
COM: <s> returns an initiliazed instance of ok command7 component </s>
|
funcom_train/8046573 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setWidthXYGlobal(float width){
if (width > 0){
Vector3D centerPoint = this.getCenterPointGlobal();
// this.scaleGlobal(1/this.getWidthXYGlobal(), 1/this.getWidthXYGlobal(), 1, centerPoint);
// this.scaleGlobal(width, width, 1, centerPoint);
float factor = (1f/this.getWidthXYGlobal())* width;
this.scaleGlobal(factor, factor, 1, centerPoint);
return true;
}else
return false;
}
COM: <s> scales the shape to the given width relative to world space </s>
|
funcom_train/41642244 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCommand(Request request) {
if (request instanceof ReconnectRequest) {
Object view = ((ReconnectRequest) request).getConnectionEditPart()
.getModel();
if (view instanceof View) {
Integer id = new Integer(
AdaptedauiVisualIDRegistry.getVisualID((View) view));
request.getExtendedData().put(VISUAL_ID_KEY, id);
}
}
return super.getCommand(request);
}
COM: <s> extended request data key to hold editpart visual id </s>
|
funcom_train/20251093 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private StringTokenizer getSizeOfTransitionTableLex(DataInputStream dis) throws NumberFormatException, IOException {
@SuppressWarnings("deprecation")
StringTokenizer st = new StringTokenizer(dis.readLine());
String colluns = st.nextToken();
String lines = st.nextToken();
colLex = Integer.parseInt(colluns);
linLex = Integer.parseInt(lines);
return st;
}
COM: <s> extract size of the transition table </s>
|
funcom_train/50032294 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Enumeration successors() {
Vector successorVec = new Vector();
Enumeration opList = validOperators();
while (opList.hasMoreElements()) {
String op = (String) opList.nextElement();
successorVec.addElement(
new Successor(applyOperator(op), op, costOf(op)) );
}
return successorVec.elements();
}
COM: <s> return successors using methods in traversable interface </s>
|
funcom_train/941516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start(final long newRunningPeriod, final long idlePeriod) {
if (!this.isStarted) {
this.isStarted = true;
this.nextKey = 0;
this.pool = Executors.newFixedThreadPool(POOL_SIZE);
this.janitor = new ManagerJanitor(newRunningPeriod, idlePeriod);
this.janitor.start();
ThreadPool.runningPeriod = newRunningPeriod;
}
}
COM: <s> start thread pool </s>
|
funcom_train/31740848 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addTag(String tag, String attribute) {
String tagLower = tag.toLowerCase();
Vector v = (Vector)tags_.get(tagLower);
if (v == null) v = new Vector();
v.add(attribute.toLowerCase());
tags_.put(tagLower, v);
}
COM: <s> specify a new attribute to edit </s>
|
funcom_train/9027039 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IDispatch getDispatchProperty(String name) {
Variant property = getVariantProperty(name);
if (property == null || property.getType() == COM.VT_EMPTY || property.getType() == COM.VT_NULL) {
return null;
}
try {
return property.getDispatch();
} catch (RuntimeException e) {
}
return null;
}
COM: <s> get a idispatch property value from this idispatch </s>
|
funcom_train/18341712 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LocalObject getLocalObjectToView(ClientObject co) {
for (Iterator itty=bullets.iterator(); itty.hasNext();) {
LocalBullet lob=(LocalBullet) itty.next();
if (co.equals(lob.getView())) {
return lob;
}
}
return null;
}
COM: <s> the collision detection routines work with the view objects not with the model </s>
|
funcom_train/34097912 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int whichRoom(int roomID) {
if (roomID == room1ID) {
return 1;
} else if (roomID == room2ID) {
return 2;
}
Logger.getLogger("FireEscapeLog").log(Level.SEVERE, "Method should always return 1 or 2.");
return -1;
}
COM: <s> returns which room the room id belongs to </s>
|
funcom_train/33849957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getPrevOpcode(int offset) {
if (offset < 0)
throw new IllegalArgumentException("offset (" + offset + ") must be nonnegative");
if (offset >= prevOpcode.length || offset > sizePrevOpcodeBuffer)
return NOP;
int pos = currentPosInPrevOpcodeBuffer - offset;
if (pos < 0)
pos += prevOpcode.length;
return prevOpcode[pos];
}
COM: <s> return previous opcode </s>
|
funcom_train/28170443 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JMenuBar createMenuBar(View p) {
JMenuBar mb = new JMenuBar();
mb.add(createFileMenu(p));
for (JMenu mm : getModel().createMenus(this, p)) {
mb.add(mm);
}
mb.add(createWindowMenu(p));
return mb;
}
COM: <s> creates a menu bar </s>
|
funcom_train/31873667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSubString(){
Value v = _rv1.sub(_sv);
assertTrue("Return type check.", v instanceof StringValue);
assertTrue("Substring check", ((StringValue)v).stringValue().startsWith("4.0"));
assertEquals(new StringValue(text.substring(3)), v);
}
COM: <s> tests addition of real value and string value </s>
|
funcom_train/36769479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void nameChanged() {
if (update) return;
if (!Controller.getInstance().testPlanEditName(nameField.getText())) {
nameField.setText(Controller.getInstance().getSelectedTestPlan().toString());
Message.displayMessage("Test plan name already exists",
"Test Tracker", JOptionPane.ERROR_MESSAGE);
}
}
COM: <s> this method is called when the user modifies the name value </s>
|
funcom_train/32956292 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void transformFormula(ParseNode rootNode) {
byte rootNodeOperandClass;
switch (_formulaType) {
case FormulaType.CELL:
rootNodeOperandClass = Ptg.CLASS_VALUE;
break;
case FormulaType.NAMEDRANGE:
case FormulaType.DATAVALIDATION_LIST:
rootNodeOperandClass = Ptg.CLASS_REF;
break;
default:
throw new RuntimeException("Incomplete code - formula type ("
+ _formulaType + ") not supported yet");
}
transformNode(rootNode, rootNodeOperandClass, false);
}
COM: <s> traverses the supplied formula parse tree calling tt ptg </s>
|
funcom_train/32219048 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void scheduleAndPerformWorkOn( Object origData )
{ long startTime, endTime, exeTime;
startTime = System.nanoTime();
centralScheduler.scheduleAndPerformWorkOn( origData, this );
endTime = System.nanoTime();
exeTime = (endTime - startTime)/1000;
updateStatsForSchedCall( exeTime );
}
COM: <s> this method is called when one desires to initiate processing data </s>
|
funcom_train/42135396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Image getScaledImage(Image srcImg, int w, int h) {
BufferedImage resizedImg = new BufferedImage(w, h,
BufferedImage.TYPE_INT_RGB);
Graphics2D g2 = resizedImg.createGraphics();
g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
RenderingHints.VALUE_INTERPOLATION_BILINEAR);
g2.drawImage(srcImg, 0, 0, w, h, null);
g2.dispose();
return resizedImg;
}
COM: <s> resizes an image using a graphics2 d object backed by a buffered image </s>
|
funcom_train/45248076 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JNumberFloatField getJNumberFloatFieldTaxaF81() {
if (jNumberFloatFieldTaxaF81 == null) {
jNumberFloatFieldTaxaF81 = new JNumberFloatField();
jNumberFloatFieldTaxaF81.setLocation(new Point(345, 216));
jNumberFloatFieldTaxaF81.setSize(new Dimension(65, 20));
}
return jNumberFloatFieldTaxaF81;
}
COM: <s> this method initializes j number float field taxa f81 </s>
|
funcom_train/24932184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MAssociationEnd otherSideAssocEnd() {
if (association().associationEnds().get(0) == this) {
return (MAssociationEnd)association().associationEnds().get(1);
}
return (MAssociationEnd)association().associationEnds().get(0);
}
COM: <s> returns the association end form the other side </s>
|
funcom_train/18575999 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getModuleInstance(String module) {
DataBlockWriter w = new DataBlockWriter();
DataBlockReader r = null;
int moduleId = -1;
w.add(module);
try {
r = call(SBWLowLevel.BROKER_MODULE, BROKER_SERVICE, METHOD_GETMODULEINSTANCE, w);
moduleId = r.getInt();
} catch (SBWException e) {
moduleId = -1;
} finally {
w.release();
}
return moduleId;
}
COM: <s> get an instance of a module </s>
|
funcom_train/9029574 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void exitApplication() {
if (connection != null) {
try {
connection.close();
} catch (SQLException ex) {
gui.putStatus(" Error in closing the connection: ");
gui.appendStatus(" " + ex.toString());
}
}
System.exit(0);
}
COM: <s> close the database connection and exit the application </s>
|
funcom_train/12596857 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object o) {
if (this == o) {
return true;
}
else if (o instanceof UpdateMap) {
UpdateMap that = (UpdateMap) o;
return ((this.getWhereClause() == null && that.getWhereClause() == null)
|| this.getWhereClause().equals(that.getWhereClause())) &&
super.equals(o);
}
else {
return false;
}
}
COM: <s> returns a tt boolean tt indicating whether the given object is equal </s>
|
funcom_train/45257677 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initializeDefaultPluginPreferences() {
// N.B. by the time this method is called, the plug-in has a
// core runtime preference store (no default values)
// call loadPreferenceStore (only) for backwards compatibility with Eclipse 1.0
loadPreferenceStore();
// call initializeDefaultPreferences (only) for backwards compatibility
// with Eclipse 1.0
initializeDefaultPreferences(getPreferenceStore());
}
COM: <s> the code abstract uiplugin code implementation of this </s>
|
funcom_train/20698035 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Set kidsSmallerThan(final Room room) {
Predicate predicate = new Predicate() {
public boolean evaluate(Object object) {
return ((Room) object).getID().longValue() < room.getID()
.longValue();
}
};
Set result = new HashSet();
CollectionUtils.select(this.getChildren(), predicate, result);
return result;
}
COM: <s> returns all other rooms who are smaller than the given room </s>
|
funcom_train/3412951 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SampleModel createCompatibleSampleModel(int w, int h) {
int[] bandOffs;
if (numBanks == 1) {
bandOffs = orderBands(bandOffsets, w*h);
}
else {
bandOffs = new int[bandOffsets.length];
}
SampleModel sampleModel =
new BandedSampleModel(dataType, w, h, w, bankIndices, bandOffs);
return sampleModel;
}
COM: <s> creates a new banded sample model with the specified </s>
|
funcom_train/32600930 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkTimer() {
// get the Tab at the current position
Tab tab = tabs.elementAt(position);
if (position < transitions.size()) {
// find the Transition for this Tab
Transition trans = findTransition(tab);
// if it is a DELAY type then start a timer
if (trans != null && trans.tType == DELAYTYPE)
startTimer(trans.delay);
}
}
COM: <s> start a new timer if the current transition is a delay type </s>
|
funcom_train/33365820 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String serialiseArgList(IOPVariable[] args) {
StringBuffer output = new StringBuffer("");
for (int i = 0; i < args.length; i++) {
output.append(args[i].toString());
if (i < args.length - 1) output.append(IOPVariable.VARIABLE_SEPARATOR);
}
return output.toString();
}
COM: <s> reads the array of iopvariables passed in and serialises them </s>
|
funcom_train/37818081 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void OnMouseOver(HyperlinkEvent e, Element el){
int pair=Integer.valueOf(GetLinkTarget(el)).intValue();
if(theAlgo.getProblemSet().getHoverPair()!=pair && theAlgo.getProblemSet().getSelectedPair()!=pair){
theAlgo.getProblemSet().setHoverPair(pair);
theAlgo.notifyHoverChanged();
}
}
COM: <s> called when mouse enters an element </s>
|
funcom_train/44026040 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void AddSlotChild(Slot slot, int row) {
setWidget(row , 0, slot);
children.add(row, slot);
NavigatorTab.getInstance().addElement(this.getTreeItem(), slot, row);
// TODO: add parent to Slot
//slot.setParent(this);
isEmpty = false;
}
COM: <s> adds slot as a child </s>
|
funcom_train/13287138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
try {
Blog blog = (Blog) obj;
return new EqualsBuilder()
.append(this.getName(), blog.getName())
.append(this.getSite(), blog.getSite())
.isEquals();
} catch (ClassCastException e) {
// The given object is not a blog, therefore they are not equal.
return false;
}
}
COM: <s> compares this blog with the given object for equality </s>
|
funcom_train/43098739 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTrigger(Object handle, Object event) {
if (handle instanceof MTransition
&& (event == null || event instanceof MEvent)) {
((MTransition) handle).setTrigger((MEvent) event);
return;
}
throw new IllegalArgumentException("handle: " + handle
+ " or event: " + event);
}
COM: <s> sets the trigger event of a transition </s>
|
funcom_train/32069841 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addLocalizedLabel(LocalizedLabel localizedLabel) {
boolean addOk = getLocalizedLabels().add(localizedLabel);
if (addOk) {
localizedLabel.setLocale((Locale)this);
} else {
if (logger.isWarnEnabled()) {
logger.warn("add returned false");
}
}
return addOk;
}
COM: <s> add the passed localized label to the locale collection </s>
|
funcom_train/31677710 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPlayer(Player player, Player.Color colour, String name) {
int pos = players.indexOf(player);
if (pos != -1) {
players.get(pos).setColor(colour);
players.get(pos).setName(name);
} else {
throw new IllegalArgumentException("Player does not exist.");
}
}
COM: <s> modifies the given player </s>
|
funcom_train/45606576 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cleanupStubs() {
File f = new File("tmp/GClientStubsHash.ser");
f.delete();
f= new File("tmp");
FileFilter filter= new FileFilter() {public boolean accept(File f) {
return f.getName().toLowerCase().endsWith(".java") ||
f.getName().toLowerCase().endsWith(".java") ;}};
File[] fa =f.listFiles(filter);
for(int a=0;a<fa.length;a++){
fa[a].delete();
}
}
COM: <s> cleans up stubs that are flooding the filesystem during the stub class </s>
|
funcom_train/44940178 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected NamedView getView(String name) {
NamedView result = null;
for (NamedView one : views) {
if (one.getName().equals(name)) {
result = one;
break;
}
}
if (result == null && views.size() != 0) {
result = views.get(0);
}
return result;
}
COM: <s> returns view with given name or default view </s>
|
funcom_train/17426628 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isPushable(final LogRecord record) {
assert Thread.holdsLock(this);
final int value = getPushLevel().intValue();
if (value == offValue || record.getLevel().intValue() < value) {
return false;
}
final Filter filter = getPushFilter();
return filter == null || filter.isLoggable(record);
}
COM: <s> check if this tt handler tt would push after storing the </s>
|
funcom_train/16619307 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void draw() {
this.setRadius();
Iterator i = featuresInSlot.iterator();
while (i.hasNext()) {
Feature currentFeature = (Feature) i.next();
currentFeature.draw(cgview, radius, featureThickness);
//remove once drawn
//i.remove();
}
}
COM: <s> draws the contents of this feature slot </s>
|
funcom_train/9993866 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setWordWrap(int row, int column, boolean wrap) {
checkCell(row, column);
String wrapValue = wrap ? "" : "nowrap";
DOM.setStyleAttribute(getElement(row, column), "whiteSpace", wrapValue);
}
COM: <s> sets whether the specified cell will allow word wrapping of its contents </s>
|
funcom_train/50237630 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void selectPreviousImage(boolean wrap) {
int index = getSelectedImage();
if (index >= 0) {
if (wrap)
index = (index == 0) ? images.size() - 1 : index - 1;
else
index = (index == 0) ? index : index - 1;
}
setSelectedImage( index );
}
COM: <s> select the previous image </s>
|
funcom_train/22902711 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CompilationUnit getClass(String packageName, String className) {
Vector<CompilationUnit> tmp = getPackage(packageName);
for (int i = 0; i < tmp.size(); i++) {
CompilationUnit cunit = tmp.elementAt(i);
List<TypeDeclaration> types = cunit.types;
for (TypeDeclaration td : types) {
if (td.name.equals(className))
return cunit;
}
}
return null;
}
COM: <s> returns the corresponding class here we decide to let user </s>
|
funcom_train/3026548 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
System.out.println("RefreshDiagramThread.run()");
System.out.flush();
//SummaryLoaderThread.waitForLoading();
System.out.println("RefreshDiagramThread.run() - 2");
System.out.flush();
while (enumx.hasMoreElements()) {
UMLPackage next = (UMLPackage) enumx.nextElement();
next.reload();
}
}
COM: <s> main processing method for the refresh diagram thread object </s>
|
funcom_train/4917981 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIncludeArtifactWithDependencies() throws Exception {
// Include artifact
String[] classPath = this.classPathFactory.createArtifactClassPath(
TEST_GROUP_ID, TEST_JAR_WITH_DEPENDENCIES_ARTIFACT_ID,
TEST_ARTIFACT_VERSION, null, null);
// Obtain paths to jars
final File JAR_WITH_DEPENDENCIES = getTestArtifactJar(true,
TEST_JAR_WITH_DEPENDENCIES_ARTIFACT_ID);
final File JAR = getTestArtifactJar(true, TEST_JAR_ARTIFACT_ID);
// Ensure jars on class path
assertClassPath(classPath, JAR_WITH_DEPENDENCIES, JAR);
}
COM: <s> ensure able to include a artifact with dependencies in class path </s>
|
funcom_train/43014730 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLink(String v) {
if (Link_Type.featOkTst && ((Link_Type) jcasType).casFeat_link == null) {
jcasType.jcas.throwFeatMissing("link", "org.apache.uima.mediawiki.types.Link");
}
jcasType.ll_cas.ll_setStringValue(addr, ((Link_Type) jcasType).casFeatCode_link, v);
}
COM: <s> setter for link sets the address the link is pointing to </s>
|
funcom_train/46857916 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JToggleButton getBtnCreateAccident() {
if (btnCreateAccident == null) {
btnCreateAccident = new JToggleButton();
btnCreateAccident.setText("Accident");
btnCreateAccident.setIcon(new ImageIcon(getClass().getResource("/resources/icons/accident.png")));
btnCreateAccident.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
getMapDisplay().setTool(ToolType.Accident);
}
});
}
return btnCreateAccident;
}
COM: <s> this method initializes btn create accident </s>
|
funcom_train/46764787 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getOkButton() {
if (okButton == null) {
okButton = new JButton();
okButton.setText(Resources.getString("bu_ok"));
okButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
ChatAdministration.getInstance().changePasswort(new String(passwordField.getPassword()));
setVisible(false);
dispose();
}
});
}
return okButton;
}
COM: <s> this method initializes ok button </s>
|
funcom_train/23641368 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void returnErrorMessage(String message, String exName, String messageID) {
mLog.debug("Returning error message...");
SOAPEnvelope error = SOAPMessages.getErrorMessage(message, exName);
//mLog.debug("Fault message: " + SOAPUtils.writeSOAPToString(error));
callBack.rpcCallBack(error, messageID);
}
COM: <s> this method returns an error message incase of failure </s>
|
funcom_train/38436761 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setup() {
super.setup();
//addBehaviour(new GetDesicionStructureIdsBehaviour(this));
SequentialBehaviour sb = new SequentialBehaviour(this);
sb.addSubBehaviour(new DMMWrapperAgent.InitBehaviour(this));
sb.addSubBehaviour(new GetAgentIdsBehaviour(this));
this.addBehaviour(sb);
log.debug("Hello! I am "+getName());
}
COM: <s> it implements initialization tasks for this agent </s>
|
funcom_train/49341070 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object createObject(String classNameKey,Class [] args,Object [] values){
try{
String className = props.getProperty(classNameKey);
System.err.println("createObject className:" + className);
Constructor constructor =
Class.forName(className).getDeclaredConstructor(args);
return constructor.newInstance(values);
}catch(Exception e){
throw new RuntimeException("Can't create object "+e.getMessage());
}
}
COM: <s> code create object code creates an object using </s>
|
funcom_train/11390798 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void computeRatio() {
for (int i = 0; i < vectorSize; i++) {
double keyWeight = getWeight(keyVector[i]);
double fpWeight = getWeight(fpVector[i]);
if (keyWeight > 0 && fpWeight > 0) {
ratio[i] = keyWeight / fpWeight;
}
}
}
COM: <s> computes the ratio a fp </s>
|
funcom_train/3391910 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void generateFrameFile() {
if (configuration.windowtitle.length() > 0) {
printFramesetHeader(configuration.windowtitle, configuration.notimestamp);
} else {
printFramesetHeader(configuration.getText("doclet.Generated_Docs_Untitled"),
configuration.notimestamp);
}
printFrameDetails();
printFrameFooter();
}
COM: <s> generate the contants in the index </s>
|
funcom_train/22588325 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveXmlFields(String filename, boolean force) throws Exception {
RTFContextFieldsReader reader = new RTFContextFieldsReader();
reader.readContext(rtfTemplate.getContext(), rtfTemplate
.getTransformerConfig(), rtfTemplate.isCircularReferences());
RTFContextUtil
.saveXmlFields(filename, reader.getContextFields(), force);
}
COM: <s> save xml fields available into file </s>
|
funcom_train/26245738 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getInt(HttpServletRequest request, String parameter) {
int i = 0;
try {
String value = request.getParameter(parameter);
if (value != null) {
i = Integer.parseInt(value);
}
} catch (NumberFormatException e) {
// Just set to zero if this isn't a number.
i = 0;
}
return i;
}
COM: <s> get the integer value of a http parameter </s>
|
funcom_train/7276668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleConnect() {
boolean stillOpen = completeConnectionInitialization(connection, true);
processConnectionHeaders(connection);
_lastSuccessfulConnect = System.currentTimeMillis();
hostCatcher.get().doneWithConnect(endpoint, true);
if(_pref)
_needPref = false;
try {
if(stillOpen)
startConnection(connection);
} catch(IOException ignored) {}
}
COM: <s> callback that handshaking has succeeded and were all connected and ready </s>
|
funcom_train/15769004 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void guiInit() {
progressLayout = new GridBagLayout();
logoLabel = new JLabel( GUIIcons.getIcon( GUIIcons.PTIS_ICON ));
messageLabel = new JLabel();
prgrsInit = new JProgressBar();
mainPanel = new JPanel( new GridBagLayout() );
}
COM: <s> author dmi try dmi </s>
|
funcom_train/7470383 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Subcollection createSubCollection(final String id, final String name) {
Subcollection subCol = null;
if (!collectionMap.containsKey(id)) {
subCol = new Subcollection(id, name, getConf());
collectionMap.put(id, subCol);
}
return subCol;
}
COM: <s> create a new subcollection </s>
|
funcom_train/28661008 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createGroupCurveAttributes() {
groupCurveAttributes = new Group(groupSettings, SWT.NONE);
groupCurveAttributes.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
groupCurveAttributes.setLayout(new GridLayout(2, false));
groupCurveAttributes.setText(Messages.getString("ECView.SelectCurveAttributes")); //$NON-NLS-1$
}
COM: <s> this method initializes group curve attributes </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.