__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/45268108 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void shoutDownClient(String name){
LEADServerPresenceManager presenceManager = LEADServer.getInstance().getPresenceManager();
ID toIdClient = null;
toIdClient = presenceManager.getLEAID(name);
ClientDisconnectMsg css = new ClientDisconnectMsg();
css.setName(name);
css.setIdClient(toIdClient);
LEADServerSharedObject serverSharedObject = getCoreSharedObject();
//send message to the selected client
serverSharedObject.sendSerializable(toIdClient, css);
}
COM: <s> sends client disconnect msg message to the selected client </s>
|
funcom_train/2756707 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateInternetUsage(String in, String out){
inSeries.add(System.currentTimeMillis(), (Double.parseDouble(in)/1024) );
outSeries.add(System.currentTimeMillis(), (Double.parseDouble(out)/1024));
if(inSeries.getItemCount() > 200){
inSeries.remove(0);
outSeries.remove(0);
}
count++;
if(count > 5){
outSeries.setNotify(true);
inSeries.fireSeriesChanged();
outSeries.setNotify(false);
count = 0;
}
}
COM: <s> this function updates the internet monitor with current values </s>
|
funcom_train/50267710 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Identifiable getIdentifiable(Subject subject, long identifiableId, ActionMessages errors) throws AuthorizationException, AuthenticationException, InternalApplicationException {
isExecutorExist = false;
ExecutorServiceDelegate executorDelegate = DelegateFactory.getInstance().getExecutorServiceDelegate();
Identifiable result = null;
try {
result = executorDelegate.getExecutor(subject, identifiableId);
isExecutorExist = true;
} catch (ExecutorOutOfDateException e) {
ActionExceptionHelper.addException(errors, e);
}
return result;
}
COM: <s> ugly fuzzy method </s>
|
funcom_train/49211214 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getInverseRelativeFlow(Cluster c, Integer node) {
TreeSet<Integer> innerBorder = c.innerBorder;
Iterator<Integer> iter = graph.getNeighbours(node).iterator();
Integer neighbour;
double flowIn = 0, flowOut = 0;
while (iter.hasNext()) {
neighbour = iter.next();
if(innerBorder.contains(neighbour) == true )
flowIn += graph.getEdgeWeight(neighbour, node);
else
flowOut += graph.getEdgeWeight(neighbour, node);
}
return flowOut / flowIn;
}
COM: <s> computes the inverse relative flow to make sure that no division by zero </s>
|
funcom_train/23297148 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public short acceptNode(Node node) {
if ((node.getNodeType() == Node.ATTRIBUTE_NODE) && (nodeName == null)) {
/** Return all attribute nodes */
return FILTER_ACCEPT;
} else if ( (node.getNodeType() == Node.ATTRIBUTE_NODE) &&
(nodeName.equalsIgnoreCase( node.getNodeName())) ) {
return FILTER_ACCEPT;
} else {
return FILTER_SKIP;
}
}
COM: <s> test whether a specified node is visible </s>
|
funcom_train/41388775 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void persist(List<T> entitiesToPersist) {
logger.debug("Persisting [{}] entities of type [{}]", entitiesToPersist.size(), entityType.getName());
for (T entity : entitiesToPersist) {
getJapaEngine().persist(getEntityType(), entity);
}
}
COM: <s> persists the entities to the jpa repository </s>
|
funcom_train/27779737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() {
logger.entering("DiscIndexDataReader", "close", location);
try {
if (f != null) {
f.close();
f = null;
}
/*
* map may be used by <!VOLATILE>'s ilists in removed(long)
* map = null;
*/
} catch (java.io.IOException x) {
logger.log(Level.WARNING, "close", x);
}
}
COM: <s> close the readers data stream </s>
|
funcom_train/39189385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getLongByFieldId( long ColId) {
int f_size = Fields.size();
for ( int f_pos = 0; f_pos < f_size; f_pos ++ ) {
Field f_this = (Field) Fields.get( f_pos);
if ( f_this.getACCS_Id() == ColId)
return( longValue[f_pos]);
}
return 0;
}
COM: <s> gets the long value of the column whose field id matches col id </s>
|
funcom_train/5812824 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String determineAuthPassPhrase(Definition def) {
String authPassPhrase = (def.getAuthPassphrase() == null ? m_config.getAuthPassphrase() : def.getAuthPassphrase());
if (authPassPhrase == null) {
authPassPhrase = SnmpAgentConfig.DEFAULT_AUTH_PASS_PHRASE;
}
return authPassPhrase;
}
COM: <s> helper method to find a authentication passphrase to use from the snmp config </s>
|
funcom_train/2883447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkConnection() throws SmartFrogLivenessException {
if (connection == null && reconnect) {
reconnect();
} else {
if (closedConnection != null) {
throw new SmartFrogLivenessException(closedConnection);
}
if (connection == null) {
throw new SmartFrogLivenessException(CONNECTION_HAS_BEEN_CLOSED);
}
}
}
COM: <s> check the connection </s>
|
funcom_train/35482508 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBuildCalendar() throws URISyntaxException, ParseException {
Calendar calendar =
feedsBo.buildCalendar(eventDao.findAll(), "http://test.base.url");
try {
calendar.validate(true);
} catch (ValidationException ex) {
fail(ex.getLocalizedMessage());
}
}
COM: <s> test of build calendar method of class feeds bo </s>
|
funcom_train/20335612 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void bake() {
try {
oven.acquire();
System.out.println();
synchronized (structuralLock) {
runningOrders.remove(order.getOrderId());
// handful of realism - just to see that the order
// could have changed, while waiting
for (String extra : order.getExtras()) {
System.out.println(extra);
}
ordersArchive.put(order.getOrderId(), order);
}
notifyClient(Stages.INOVEN);
delay(stageLength);
oven.release();
} catch (InterruptedException e) {
System.out.println("The oven is broken");
}
}
COM: <s> places pizza in the oven bakes it </s>
|
funcom_train/17492584 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void visitUnaryExpression(UnaryExpression node) {
// Visit the subexpression
Object o = node.getExpression().acceptVisitor(this);
if (o != null) {
if (o instanceof ReferenceType) {
throw new ExecutionError("malformed.expression", node);
}
node.setExpression((Expression) o);
}
}
COM: <s> visits the subexpression of an unary expression </s>
|
funcom_train/41452093 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void service(javax.servlet.ServletRequest req, javax.servlet.ServletResponse resp) throws javax.servlet.ServletException, java.io.IOException{
if (req != null) {
doRequest((SipServletRequest) req);
} else {
SipServletResponse response = (SipServletResponse)resp;
if(response.isBranchResponse()) {
doBranchResponse(response);
} else {
doResponse(response);
}
}
}
COM: <s> invoked to handle incoming sip messages requests or responses </s>
|
funcom_train/48089103 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getPlayToneCommand() {
if (playToneCommand == null) {//GEN-END:|67-getter|0|67-preInit
// write pre-init user code here
playToneCommand = new Command("Play Tone", Command.ITEM, 0);//GEN-LINE:|67-getter|1|67-postInit
// write post-init user code here
}//GEN-BEGIN:|67-getter|2|
return playToneCommand;
}
COM: <s> returns an initiliazed instance of play tone command component </s>
|
funcom_train/1838982 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDataPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_TreeNode_data_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_TreeNode_data_feature", "_UI_TreeNode_type"),
TreePackage.Literals.TREE_NODE__DATA,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the data feature </s>
|
funcom_train/458692 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(Collection packets, long now) {
int n = packets.size();
Point3d[] pts = new Point3d[1 + n];
Color4f[] cols = new Color4f[1 + n];
addDefaultPoint(pts, cols);
addPackets(packets, now, pts, cols);
PointArray points = new PointArray(
pts.length,
GeometryArray.COORDINATES | GeometryArray.COLOR_4);
points.setCoordinates(0, pts);
points.setColors(0, cols);
setGeometry(points);
}
COM: <s> create a display of the models current state </s>
|
funcom_train/45812821 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getMaximumTime() {
double max = 0.0;
for (int i=0; i < timeSample.size(); i++) {
double actVal = ((Double)timeSample.get(i)).doubleValue();
if (actVal > max)
max = actVal;
}
return max;
}
COM: <s> internal get minimum sampled time in seconds </s>
|
funcom_train/31359612 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setService(ServiceComponentModel scm){
Object id = scm.table.get(scm.ID);
Object name = scm.table.get(scm.NAME);
System.out.println(" service added: "+ id + " " + name);
serviceNameMap.put(id, name);
serviceIdMap.put(name, id);
serviceComponentMap.put(name, scm);
// hack to update log sources after service is added
if (logComponent != null)
logComponent.updateSources();
else
((LogCM)getTreeNode().getChildObject(2)).updateSources();
}
COM: <s> server component specific </s>
|
funcom_train/33433648 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parse( final CtAddress ctAdress ) {
if( ctAdress == null )
throw new IllegalArgumentException("Address is null.");
this.setStreet( ctAdress.getStreet() );
this.setCity( ctAdress.getCity() );
this.setState( ctAdress.getState() );
this.setCountry( ctAdress.getCountry() );
}
COM: <s> it was necessary because cant cast ct address to address </s>
|
funcom_train/24059188 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void redo() {
try {
// Redo the first step first:
for (Step step : _steps) {
if (step._type == Step.Type.INSERT) {
_annotations.add(step._index, step._annotation);
}
else if (step._type == Step.Type.REMOVE) {
_annotations.removeLastOccurrence(step._annotation);
}
}
} catch (IndexOutOfBoundsException e) {
throw new IllegalStateException();
}
}
COM: <s> redoes this action </s>
|
funcom_train/44852752 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void ucNew(Long inParentID, Long inChildID, Long inGroupID) throws VException, SQLException {
QuestionHierarchy lHierachy = (QuestionHierarchy)create();
lHierachy.set(QuestionHierarchyHome.KEY_PARENT_ID, inParentID);
lHierachy.set(QuestionHierarchyHome.KEY_CHILD_ID, inChildID);
lHierachy.set(QuestionHierarchyHome.KEY_GROUP_ID, inGroupID);
lHierachy.insert(true);
}
COM: <s> adds a new entry to the question hierarchy </s>
|
funcom_train/18481232 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCombineAlphaSource1(CombineColorSource combine_alpha_source1) {
if (combine_alpha_source1 != this.combine_alpha_source1) {
CombineColorSource old = this.combine_alpha_source1 ;
this.combine_alpha_source1 = combine_alpha_source1 ;
notifyChanged(COMBINEALPHASOURCE1,old,combine_alpha_source1) ;
}
}
COM: <s> sets the combinesource for the alpha component for source 1 </s>
|
funcom_train/15718787 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isNotScheduled() {
if(mStartDateString != null) {
String[] parts = mStartDateString.split("\\s+");
return !isDisabled() && parts.length == 2 && parts[0].equals("00/00/0000") && parts[1].equals("0:00:00");
}
return false;
}
COM: <s> gets if this task will not run any time </s>
|
funcom_train/36685777 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getAllColumns(boolean createStatement) {
String str = "";
for (int i = 0; i < default_columns.length; i++) {
str += default_columns[i][DEFAULT_COLUMN_NAME] + " ";
if (createStatement)
str += Types
.getTypeString((Integer) default_columns[i][DEFAULT_COLUMN_TYPE])
+ " " + default_columns[i][DEFAULT_COLUMN_RESTRICTION];
if (i < default_columns.length - 1)
str += ",";
}
return str;
}
COM: <s> returns all column names for the </s>
|
funcom_train/25707162 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String computeChecksumSHA256(String message) {
try {
byte[] food = message.getBytes("UTF-8");
return computeChecksumSHA256(food);
} catch(UnsupportedEncodingException ex) {
logger.log(Level.SEVERE, "UTF-8 encoding is not supported.", ex);
}
return null;
}
COM: <s> computes the sha256 checksum of utf 8 string </s>
|
funcom_train/28750753 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPrintfile(String newVal) {
if ((newVal != null && this.printfile != null && (newVal.compareTo(this.printfile) == 0)) ||
(newVal == null && this.printfile == null && printfile_is_initialized)) {
return;
}
this.printfile = newVal;
printfile_is_modified = true;
printfile_is_initialized = true;
}
COM: <s> setter method for printfile </s>
|
funcom_train/9978356 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void globalResultItemSelected(Element elt) {
// Fill menu
openEditGlobalResultPanel(elt);
MenuItem removeItem = new MenuItem(popupMenu, SWT.PUSH);
removeItem.setText("Remove result");
removeItem.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
model.deleteGlobalResult((Element) tree.getSelection()[0].getData());
tree.getSelection()[0].dispose();
}
});
}
COM: <s> called when global result item has been selected </s>
|
funcom_train/2888796 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean ping(String inHost) {
ProcessBuilder pb;
if (System.getProperty("os.name").toLowerCase().startsWith("windows")) {
pb = new ProcessBuilder("ping", inHost);
}
else {
pb = new ProcessBuilder("ping", "-c", "4", inHost);
}
try {
Process p = pb.start();
p.waitFor();
return (p.exitValue() == 0);
} catch (Exception e) {
Log.error(e);
}
return false;
}
COM: <s> pings a host </s>
|
funcom_train/26201091 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setClip(int x,int y,int w,int h) {
clipRectangle = new Rectangle(x,y,w,h);
closeBlock(); // finish off any existing paths
drawRect(x,y,w,h);
closeBlock("W n"); // clip to current path
}
COM: <s> clips to a set of coordinates </s>
|
funcom_train/2713985 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getMessage(ResourceBundle bundle, int errorCode) {
String message = null;
try {
message = bundle.getString(String.valueOf(errorCode));
} catch (MissingResourceException mse) {
Logger.logError("Could not find message for error code: " +
errorCode, mse);
}
return message;
}
COM: <s> get message from given resource bundle for </s>
|
funcom_train/39965542 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void findFlush() {
for (int i = 0; i < Card.NO_OF_SUITS; i++) {
if (suitDist[i] >= 5) {
// We found a flush! Now find the matching highest rank.
for (Card card : cards) {
if (card.getSuit() == i) {
flushRank = card.getRank();
break;
}
}
break;
}
}
}
COM: <s> looks for a flush i </s>
|
funcom_train/44559758 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setFields(XmlModule module, Element element) throws InvalidValueException {
NodeList nodes = element.getElementsByTagName("field");
for (int i = 0; i < nodes.getLength(); i++) {
fields.add(new XmlField(module, (Element) nodes.item(i)));
}
}
COM: <s> creates the xml field definitions </s>
|
funcom_train/45077483 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addOrCriteria(Criteria pc) {
if (!criteria.isEmpty()) {
pc.setEmbraced(false);
pc.setType(OR);
criteria.addElement(pc);
} else {
setEmbraced(false);
setType(NONE); // root object
criteria = pc.getCriteria();
}
}
COM: <s> ors two sets of criteria together </s>
|
funcom_train/2801943 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOffset(String pOffset) {
mOffset = pOffset;
if (mOffset.charAt(0) == '/') {
mOffset = mOffset.substring(1);
}
if (mOffset.charAt(mOffset.length() - 1) == '/') {
mOffset = mOffset.substring(0, mOffset.length() - 1);
}
}
COM: <s> defines the relative offset to add to the sequence class directory </s>
|
funcom_train/10619110 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getChar(char[] dst, int offset, int length) {
if (byteBase != null) {
byteBase.getChar(dst, offset, length);
} else {
throw new UnsupportedOperationException("not inmplemented"); //$NON-NLS-1$
}
}
COM: <s> this method transfers chars into the given destination array </s>
|
funcom_train/9271459 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setTimeout(int timeout) {
try {
// Sets a timeout on the socket
socket_.setSoTimeout(timeout * 1000); // convert to milliseconds
} catch (SocketException se) {
// Silently ignore any exceptions from the socket layer
if (SanityManager.DEBUG) {
System.out.println("NetAgent.setTimeout: ignoring exception: " +
se);
}
}
}
COM: <s> specifies the maximum blocking time that should be used when sending </s>
|
funcom_train/19540701 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void refreshImage() {
synchronized (this) {
// clear out width/height/realoadimage flag and set loading flag
state = (state | LOADING_FLAG | RELOAD_IMAGE_FLAG | WIDTH_FLAG | HEIGHT_FLAG) ^ (WIDTH_FLAG | HEIGHT_FLAG | RELOAD_IMAGE_FLAG);
width = height = 0;
}
try {
// And update the size params
updateImageSize();
} finally {
synchronized (this) {
// Clear out state in case someone threw an exception.
state = (state | LOADING_FLAG) ^ LOADING_FLAG;
}
}
}
COM: <s> loads the image and updates the size accordingly </s>
|
funcom_train/23280542 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getState(ExtendedAttributes extendedAttributes) {
if (extendedAttributes == null) return "";
List<ExtendedAttribute> attributes = extendedAttributes.getExtendedAttribute();
String state = "";
for (ExtendedAttribute attribute : attributes) {
if (attribute.getName().equals("state")) {
state = attribute.getValue();
break;
}
}
return state;
}
COM: <s> method to extract the state attribute from a list of extended </s>
|
funcom_train/46459715 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
// return the child "name" property of a control element, if any
if(prop instanceof XMLControl) {
XMLControl control = (XMLControl) prop;
String name = control.getString("name"); //$NON-NLS-1$
if(name!=null) {
return name;
}
}
return prop.getPropertyName();
}
COM: <s> this is used by the tree node to get a node label </s>
|
funcom_train/12195876 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetProfileUrlsMissingProfileHeader() {
headers.addHeader("13-profile", "http://www.profile.url.com/");
final List urls = DevicesHelper.getProfileUrls(headers, "13-profile");
assertEquals(1, urls.size());
assertEquals("http://www.profile.url.com/", urls.get(0));
}
COM: <s> profile header without namespace declaration namespace declaration is </s>
|
funcom_train/4533027 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void process(IntermediateForm form) throws IOException {
// first delete
Iterator<Term> iter = form.deleteTermIterator();
while (iter.hasNext()) {
writer.deleteDocuments(iter.next());
}
// then insert
writer.addIndexesNoOptimize(new Directory[] { form.getDirectory() });
numForms++;
}
COM: <s> process an intermediate form by carrying out on the lucene instance of </s>
|
funcom_train/51540408 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int read() throws IOException {
if (position > (resourceLength - 1)) {
//System.out.println("test read(): EOF");
return -1;
}
//System.out.println("test read():" + (buffer[position] & 0xff));
return (buffer[position++] & 0xff);
}
COM: <s> reads the next byte of data from the input stream </s>
|
funcom_train/4921613 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testOutput() {
// Create the expected section
SectionDesigner expected = this.createSectionDesigner(
MockOutputSection.class, "doInput");
expected.addSectionInput("doInput", null);
expected.addSectionOutput("doOutput", null, false);
// Validate section
SectionLoaderUtil.validateSection(expected, ClassSectionSource.class,
MockOutputSection.class.getName());
}
COM: <s> ensure and provide </s>
|
funcom_train/12126305 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void propertyChange( PropertyChangeEvent evt ) {
if( component.isAncestorOf( (Component)evt.getSource() ) &&
( (Component)evt.getSource() ).getFont() != null ) {
minFontSize = Math.min( minFontSize, ( (Component)evt.getSource() ).getFont().getSize() );
}
}
COM: <s> listens for changes in font on components rooted at this pswing </s>
|
funcom_train/17836025 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long scheduleTimeEventMillis(TimeEvent event, double msec) {
long time = (long) (getTime() + msec / 1000 * BasicClockModule.MAX_DCO_FRQ);
// System.out.println("Scheduling at: " + time + " (" + msec + ") getTime: " + getTime());
scheduleTimeEvent(event, time);
return time;
}
COM: <s> schedules a new time event msec milliseconds in the future </s>
|
funcom_train/3514787 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void listen() throws IOException {
m_serverSocket = new ServerSocket(s_smtp_port, 0, m_bindAddr);
m_logger.info("Listener started on " +
((m_bindAddr == null) ?
"*" : m_bindAddr.getHostAddress()) +
":" + s_smtp_port);
}
COM: <s> starts the listener </s>
|
funcom_train/15567752 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setString(int _row,int _column, String _value) {
if (stringRowList[_row]==null)
return false;
if (stringV[_row].length>=_column)
return false;
stringV[_row][_column]=_value;
return true;
}
COM: <s> code set string code sets a string at a specified position </s>
|
funcom_train/49017169 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAmbience(String sAmbienceID) {
this.ambiences.remove(sAmbienceID);
// Propagate the event
Properties properties = new Properties();
properties.put(DETAIL_CONTENT, sAmbienceID);
ObservationManager.notify(new Event(EventSubject.EVENT_AMBIENCE_REMOVED, properties));
}
COM: <s> remove a ambience </s>
|
funcom_train/16218570 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void render(Graphics2D g) {
this.render(g, (int) this.x, (int) this.y, this.clip.x, this.clip.y, (this.width < this.clip.width) ? this.width : this.clip.width, (this.height < this.clip.height) ? this.height
: this.clip.height);
}
COM: <s> renders background to specified graphics context </s>
|
funcom_train/49206578 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getFilenamePrefix() {
String hostname = SystemSettingsManager.getInstance().getHostName();
if (hostname != null) {
// remove any non-word chars
hostname = hostname.replaceAll("\\W", "");
// make sure I actually have something left to work with
if (hostname.length() > 0) {
return hostname;
}
}
// last report, return this string
return "localhost";
}
COM: <s> gets the filename prefix </s>
|
funcom_train/3720572 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String makeBeanAttribute(AttributeDefinition att) {
StringBuffer code = new StringBuffer();
code.append(" public ");
code.append(att.getDataType());
code.append(" ");
code.append(att.getName());
code.append("; \r\n");
return code.toString();
}
COM: <s> returns public attribute declaration associated with this attribute in cmp entity bean </s>
|
funcom_train/23032322 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File tempRuleFile(Rule rule){
File tempFile = null;
try {
tempFile = File.createTempFile("temporary-osbl-agent", ".xml");
tempFile.deleteOnExit();
FileOutputStream fileOutStream = new FileOutputStream(tempFile);
XMLEncoder xmlEncoder = new XMLEncoder(fileOutStream);
xmlEncoder.writeObject(rule);
xmlEncoder.close();
fileOutStream.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return tempFile;
}
COM: <s> provides a temporary file with an exported rule </s>
|
funcom_train/5522737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetNonCanonicalDTD() {
System.out.println();
log.info("testSetNonCanonicalDTD");
X3dHeaderChecker.main(new String[] {"-f", testFilesDir + "TestNonCanonicalDTD.x3d"});
log.info("Remember to reset DTD with whitespace to prepare for retest");
}
COM: <s> test of main method setting of a non canonical dtd </s>
|
funcom_train/9558809 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void maybeLoadFilterRules() throws RulesLoadingException {
if (filterRules == null) {
try {
loadFilterRulesRows();
} catch (SQLException e) {
System.out.println("SQL Exception in maybeLoadFilterRules: " + e.getMessage());
throw new RulesLoadingException("SQL Exception in maybeLoadFilterRules: " + e.getMessage());
}
}
}
COM: <s> load filter rules if they arent loaded yet </s>
|
funcom_train/38311304 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadFile(String fileName) throws IOException {
StringBuffer text = new StringBuffer();
BufferedReader textReader = new BufferedReader(new FileReader(fileName));
String line = null;
while ((line = textReader.readLine()) != null) {
text.append(line);
text.append("\n");
}
editor.setText(text.toString());
}
COM: <s> loads a file into the editor </s>
|
funcom_train/34314066 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toCSV() {
StringBuilder sb = new StringBuilder();
for (Measure m : measures) {
double value = Double.NaN;
try {
value = m.getValue();
} catch (Exception ex) {
}
sb.append(String.format("%.4f", value));
sb.append(";");
}
return sb.toString();
}
COM: <s> returns a csv representation of the calculated measures </s>
|
funcom_train/44385405 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private HookTask createRemoveHook(String moduleName) {
// Remove hook command
HookTask removeHook = new HookTask();
removeHook.setProject(this.getProject());
removeHook.setTaskName(this.getTaskName());
removeHook.setAction(HookTask.REMOVE);
removeHook.setModule(moduleName);
removeHook.setEu(ExecutionUnit.NONE);
return removeHook;
}
COM: <s> create a new remove hook task for plugin module </s>
|
funcom_train/25714061 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Action newActionInstance(Class<?> cls) throws Exception {
try {
return (Action) cls.getMethod("getInstance").invoke(null);
} catch (NoSuchMethodException e1) {
try {
return (Action) cls.getConstructor(String.class).newInstance(getTemplatePresentation().getText());
} catch (NoSuchMethodException e2) {
return (Action) cls.newInstance();
}
}
}
COM: <s> tries to create an instance of the given argo uml action class </s>
|
funcom_train/2676698 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void notifyModified() {
if (updateCounter > 0) {
// we're inside a beginUpdate...endUpdate block
return;
}
if (modified) {
// The client sent at least one update -> increase version of SO
updateVersion();
lastModified = System.currentTimeMillis();
}
if (modified && storage != null) {
if (!storage.save(this)) {
log.error("Could not store shared object.");
}
}
sendUpdates();
}
COM: <s> send notification about modification of so </s>
|
funcom_train/23519011 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPrefix(String prefix, URI dest) {
log.debug("adding prefix {} -> {}", prefix, dest);
URI other;
if (null != (other = uriPrefixes.get(prefix)) && !other.equals(dest)) {
throw new OWLSBuilderException(
"Conflicting prefix. \"{}\" is already defined as \"{}\" cannot define as \"{}\"",
prefix, other, dest);
}
uriPrefixes.put(prefix, dest);
}
COM: <s> adds a uri prefix to the context </s>
|
funcom_train/34908083 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDolniHranicePropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_Vaha_dolniHranice_feature"),
getString("_UI_Vaha_dolniHranice_description"),
GebzPackage.Literals.VAHA__DOLNI_HRANICE, false, false, false,
ItemPropertyDescriptor.REAL_VALUE_IMAGE,
getString("_UI_HodnotyPropertyCategory"), null));
}
COM: <s> this adds a property descriptor for the dolni hranice feature </s>
|
funcom_train/38293662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void clean(){
if (entriesToDelete) {
ArrayList toBeRemoved = new ArrayList();
Iterator iter = facts.values().iterator();
while(iter.hasNext()){
DFAgentDescription dfd = (DFAgentDescription) iter.next();
if(dfd.checkLeaseTimeExpired()) {
toBeRemoved.add(dfd.getName());
}
}
iter = toBeRemoved.iterator();
while (iter.hasNext()) {
facts.remove((AID) iter.next());
}
}
}
COM: <s> scan the facts and remove those whose lease time has expired </s>
|
funcom_train/18125181 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RuleType addNonEmptyTargetToRule(RuleType rule, TargetType target){
ConditionType existingCondition = rule.getCondition();
JAXBConditionWriter conditionWriter = new JAXBConditionWriter();
ConditionType finalCondition = conditionWriter.getCondition(target);
if(existingCondition != null){ //AND the Target information
JAXBConditionWriter condtionWriter = new JAXBConditionWriter();
finalCondition = condtionWriter.getANDCondition(existingCondition, finalCondition);
}
rule.setCondition(finalCondition);
return rule;
}
COM: <s> adding non empty target to the rule </s>
|
funcom_train/20351153 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void clearDatacenters() {
for (Vm vm : getVmsCreatedList()) {
Log.printLine(CloudSim.clock() + ": " + getName() + ": Destroying VM #" + vm.getId());
sendNow(getVmsToDatacentersMap().get(vm.getId()), CloudSimTags.VM_DESTROY, vm);
}
getVmsCreatedList().clear();
}
COM: <s> destroy the virtual machines running in datacenters </s>
|
funcom_train/8994999 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Document resetDocumentContent(Document document, InputStream data, String extension) throws Exception {
String content = IndexConverter.getText(data, (extension==null?"TXT":extension));
return getIndexOperation().resetDocument(document, new String[]{FieldNames.CONTENT}, new String[]{content});
}
COM: <s> reset document content field by gived input strem and its extension </s>
|
funcom_train/21934416 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Texture loadTexture(GL gl, String path) throws IOException {
Texture texture = (Texture) textureCache.get(path);
if (texture != null) return texture;
texture = loadTexture(gl,
path,
gl.GL_TEXTURE_2D, // target
gl.GL_RGBA, // dst pixel format
gl.GL_LINEAR, // min filter (not used)
gl.GL_LINEAR);
textureCache.put(path, texture);
return texture;
}
COM: <s> load a texture from the filesystem </s>
|
funcom_train/20803413 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private BufferedImage createOrUpdateBackBuffer (BufferedImage bufferImage) {
Graphics2D g2d = (Graphics2D) getGraphics();
if ((bufferImage == null) || (getWidth() > bufferImage.getWidth()) || (getHeight() > bufferImage.getHeight())) {
bufferImage = g2d.getDeviceConfiguration().createCompatibleImage (getWidth(), getHeight(), Transparency.OPAQUE);
}
clearBackBuffer (bufferImage);
return bufferImage;
}
COM: <s> pre create a backing store buffered image and graphics2 d </s>
|
funcom_train/50221220 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean remove(Object o) {
int ind = tags.indexOf(o);
if (ind < 0) return false;
//((GraphicsPrimitive) primitives.remove(ind)).destroy();
primitives.remove(ind);
AbstractTag t = (AbstractTag) tags.remove(ind);
//t.destroy();
return true;
}
COM: <s> removes the first occurrence in this list of the specified element </s>
|
funcom_train/51642157 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkGenericTypes(final IProgressMonitor monitor, final MethodDeclaration declaration, final RefactoringStatus status) {
Assert.isNotNull(monitor);
Assert.isNotNull(declaration);
Assert.isNotNull(status);
try {
monitor.beginTask("", 1); //$NON-NLS-1$
monitor.setTaskName(RefactoringCoreMessages.MoveInstanceMethodProcessor_checking);
final AstNodeFinder finder= new GenericReferenceFinder(declaration);
declaration.accept(finder);
if (!finder.getStatus().isOK())
status.merge(finder.getStatus());
} finally {
monitor.done();
}
}
COM: <s> checks whether the method has references to type variables or generic </s>
|
funcom_train/45864034 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void pointerPressed(int x, int y) {
if (ENABLE_POINTER) {
x -= viewOffsetX;
y -= viewOffsetY;
if (x >= 0 && y >= 0 && x < viewW && y < viewH) {
container.getClicked(x, y, true);
}
pressedCoord.set(x << Fixed.FIXED_POINT, y << Fixed.FIXED_POINT);
}
}
COM: <s> handles the pointer or mouse presses and drags </s>
|
funcom_train/49159890 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createStats(LeagueElement leagueElement) {
// Add stats for a league Element to the team
teamStats.add(new TeamStats(this, leagueElement));
// Add stats to every Player of this team
for (int i = 0; i < players.size(); i++) {
players.get(i).createStats(leagueElement);
}
}
COM: <s> create stats for a league element in players too </s>
|
funcom_train/5038183 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initialise(String junitBaseDir) {
// if (initialised) {
// return;
// }
baseDir = junitBaseDir;
try {
System.out.println("Set up Queue " + waitingExecutor);
waitingExecutor.setReadWriteLock((XReadWriteLock) myReadWriteLock);
waitingExecutor.init();
} catch (Exception e) {
System.err.println("Unable to initialise queue");
}
masterScheduler = new MasterScheduler();
masterScheduler.setSource(this);
readConfig();
loadDatasource();
checkOutDatasource();
initialised = true;
}
COM: <s> only to be used for junit tests to initialise the master datasource </s>
|
funcom_train/7475303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setString(int blk, int offset, String val) {
// concurMgr.xLock(blk);
Buffer buff = myBuffers.getBuffer(blk);
// int lsn = recoveryMgr.setString(buff, offset, val);
// buff.setString(offset, val, txnum, lsn);
buff.setString(offset, val, txnum, 1);
}
COM: <s> stores a string at the specified offset </s>
|
funcom_train/48054044 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSamplingRate(int rate) {
Date timerate = new Date(rate);
if (sampligRateModel.getStart().compareTo(timerate) > 0
|| sampligRateModel.getEnd().compareTo(timerate) < 0) {
throw new IllegalArgumentException("Invalid time interval");
}
jSpinnerSamplingRate.setValue(timerate);
}
COM: <s> sets the database sampling rate </s>
|
funcom_train/49156565 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getDouble() throws EOFException, IOException, NumberFormatException {
String s = get();
if (s == null) {
return 0;
}
if (!trim) {
s = s.trim();
}
if (s.length() == 0) {
return 0;
}
return Double.parseDouble(s);
}
COM: <s> read one double field from the csv file </s>
|
funcom_train/29409160 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doValidate(boolean doValidate){
if(doValidate){
if(resourceListener == null){
resourceListener = new OepcResourceListener(this);
}
if(diagramEditPart != null){
diagramEditPart.getEditingDomain().addResourceSetListener(
resourceListener);
}
}
else{
if(resourceListener != null && diagramEditPart != null){
diagramEditPart.getEditingDomain().removeResourceSetListener(
resourceListener);
resourceListener = null;
}
}
this.doValidate = doValidate;
}
COM: <s> sets the code do validate code flag </s>
|
funcom_train/29883400 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initializeForSplitPages() {
// Start at page 1
mNumberOfPagesFound = 0;
// Start a new PriPclPage
mPriPclPage = new PriPclPage();
// Start a new ArrayList of PriPclPage objects
mPagesArrayList = new ArrayList<PriPclPage>(10);
}
COM: <s> initialize before splitting the pcl bytes into separate pages </s>
|
funcom_train/13714409 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean remove(PathWitness witness) {
int act = witness.getRule().getAction();
if (pending.get(act).remove(witness)) {
return true;
}
if (nonPending.get(act).remove(witness)) {
return false;
}
throw new IllegalArgumentException (witness + " is not in the FullPathWitnessTable");
}
COM: <s> removes a path witness from the full path witnesses and returns a flag </s>
|
funcom_train/625078 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void outAMultiplicativeExpression(AMultiplicativeExpression node) {
Instance value = null;
Node primExpr = node.getUnaryExpression();
Iterator mults = node.getMultiplication().iterator();
while (mults.hasNext()) {
AMultiplication mult = (AMultiplication) mults.next();
Node op = mult.getMultiplyOperator();
value = invokeOperator(primExpr, op, mult.getUnaryExpression());
}
if (value == null) {
transferAnnotatedValue(primExpr, node);
} else {
annotate(node, value);
}
}
COM: <s> evaluates and annotates the value s of a multiplicative expression </s>
|
funcom_train/5363004 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector listXMLObjects( String collectionName ) throws Exception {
Collection col = getCollection( collectionName );
String[] result = col.listXMLObjects();
Vector XMLObj = new Vector();
for ( int i = 0; ( result != null ) && ( i < result.length ); i++ ) {
XMLObj.addElement( result[i] );
}
return XMLObj;
}
COM: <s> lists all xml objects within the collection </s>
|
funcom_train/37588257 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setWorkingDirectory(File f) {
_state.setWorkingDirectory(f);
_notifier.projectWorkDirChanged();
setProjectChanged(true);
// update the setting
DrJava.getConfig().setSetting(LAST_INTERACTIONS_DIRECTORY, _state.getWorkingDirectory());
}
COM: <s> sets the working directory for the project ignored in flat file model </s>
|
funcom_train/25060390 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Boolean checkFileLocation(String fileLocation) {
try {
File finder = new File(_projectBaseLocation + fileLocation);
return finder.exists();
}
catch (Exception ex) {
log.error(ex.getMessage()); // Let the developers know...
log.error(ex);
return Boolean.FALSE;
}
}
COM: <s> answer the question does this file exist </s>
|
funcom_train/16849469 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void loadProperties() {
try {
URL url = getPropertiesURL(propertiesPath);
Properties p = new Properties();
PropUtils.loadProperties(p, url.openStream());
ClientRegistry.setOpenmapProperties(p);
} catch (IOException ex) {
throw new SeismoException(ex);
}
}
COM: <s> loads the application properties to a </s>
|
funcom_train/46328280 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getNodeHashCode(Tree<E> node, int result) {
result = 37 * result + (node.item == null ? 0 : node.item.hashCode());
for (Tree<E> childNode : node.children) {
result += getNodeHashCode(childNode, result);
}
return result;
}
COM: <s> recursively generate a hash code from the data items in each node </s>
|
funcom_train/22279200 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Range runForPoint(int x,int y) {
TextPositionInfo info = positionForPoint( x,y,true );
TextStyleRun run;
if( info != null ) {
run = _runForIndex( info._absPosition );
if( run != null )
return run.range();
}
return allocateRange(); /* return a nullRange() */
}
COM: <s> returns the range of the run containing the point </s>
|
funcom_train/50463240 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
try {
launch(appletDesc);
} catch(LaunchException exp) {
String msg = MessageFormat.format(Resources.appletBundle.getString("launch.error.message"), exp.getMessage());
Boot.showError(Resources.appletBundle.getString("launch.error.title"), msg, exp);
}
}
COM: <s> launch the application </s>
|
funcom_train/4546845 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getName() {
int length = 0;
for (int i = NAME_OFFSET; i < size(); i++, length++) {
if (data.getData(i) == 0) {
break;
}
}
if (length == 0) {
return "";
}
return new String(data.getData(NAME_OFFSET, length));
}
COM: <s> return the name of the track </s>
|
funcom_train/37444519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public QueryString addMode(final JSPBeanMode mode) {
if (mode == null) {
LOGGER.warn("No mode is specified, setting mode to: UNKNOWN!");
return add(MODE, JSPBeanMode.UNKNOWN.name());
} else {
return add(MODE, mode.name());
}
}
COM: <s> convenience method to add a mode parameter to this query string </s>
|
funcom_train/2585382 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetRangeUpperBound() {
DefaultStatisticalCategoryDataset d1
= new DefaultStatisticalCategoryDataset();
d1.add(1.0, 2.0, "R1", "C1");
assertEquals(1.0, d1.getRangeUpperBound(false), EPSILON);
assertEquals(3.0, d1.getRangeUpperBound(true), EPSILON);
}
COM: <s> some checks for the get range upper bound method </s>
|
funcom_train/45499058 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton2() {
if (jButton2 == null) {
jButton2 = new JButton();
jButton2.setBounds(new Rectangle(292, 370, 100, 25));
jButton2.setText("Demo 3");
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
// TODO Auto-generated Event stub actionPerformed()
RunDemo(3);
}
});
}
return jButton2;
}
COM: <s> this method initializes j button2 </s>
|
funcom_train/39880825 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeObject(java.io.ObjectOutputStream out) throws IOException {
ObjectOutputStream.PutField fields = out.putFields();
fields.put("all_allowed", allEnabled);
fields.put("permissions", new Hashtable<String, Permission>(items));
fields.put("permClass", permClass);
out.writeFields();
}
COM: <s> expected format is the following </s>
|
funcom_train/10748805 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testThrowableString() {
Throwable th = new Throwable("aaa");
assertEquals("incorrect message", "aaa", th.getMessage());
assertNull("cause should be null", th.getCause());
assertTrue("empty stack trace", th.getStackTrace().length > 0);
}
COM: <s> constructor under test throwable string </s>
|
funcom_train/7748670 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean testAttributeTrue(Object a) {
if ( a==null ) {
return false;
}
if ( a instanceof Boolean ) {
return ((Boolean)a).booleanValue();
}
if ( a instanceof Collection ) {
return ((Collection)a).size()>0;
}
if ( a instanceof Map ) {
return ((Map)a).size()>0;
}
if ( a instanceof Iterator ) {
return ((Iterator)a).hasNext();
}
return true; // any other non-null object, return true--it's present
}
COM: <s> normally string template tests presence or absence of attributes </s>
|
funcom_train/4923972 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMatchByNoFilterKey() {
this.recordEvent(1, MockOneListener.class, "EVENT", "MATCH_KEY");
this.recordInit(new CometInterest(MockOneListener.class.getName(), null));
this.recordResponse(new CometEvent(1, MockOneListener.class.getName(),
"EVENT", "MATCH_KEY"));
this.doTest();
}
COM: <s> ensure if no filter key to match all events for listener type </s>
|
funcom_train/6464577 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(IGenome genome) {
if(genome == null) {
AILibException e = new AILibException(getClass(), "remove(IGenome)", Messages.get("null.argument"));
return;
}
int i = 0;
for( ; i < allocated && rawPopulation[i] == genome; i++) {}
if(i < allocated)
remove(i, SORT_BASIS_RAW);
else {
AILibException e = new AILibException(getClass(), "remove(IGenome)", Messages.get("ga.genome.not.found"));
}
}
COM: <s> removes the given genome from the population </s>
|
funcom_train/23279487 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Map referenceData(HttpServletRequest request) throws Exception {
Map<String,Object> referenceData = new HashMap<String,Object>();
referenceData.put("ispf",ispfManager.getIspf((long)Long.parseLong(request.getParameter("ispfId"))));
return referenceData;
}
COM: <s> create a reference data map for the given request </s>
|
funcom_train/8660976 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Reference getReference() throws NamingException {
Reference ref = new Reference(getClass().getName(),
PerUserPoolDataSourceFactory.class.getName(), null);
ref.add(new StringRefAddr("instanceKey", instanceKey));
return ref;
}
COM: <s> returns a code per user pool data source code </s>
|
funcom_train/50066715 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getSaveCommand() {
if (saveCommand == null) {//GEN-END:|96-getter|0|96-preInit
// write pre-init user code here
saveCommand = new Command("Save", Command.OK, 0);//GEN-LINE:|96-getter|1|96-postInit
// write post-init user code here
}//GEN-BEGIN:|96-getter|2|
return saveCommand;
}
COM: <s> returns an initiliazed instance of save command component </s>
|
funcom_train/301433 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void imgPanelLinkMouseClicked(MouseEvent evt) {
if ( (evt.getModifiers() & evt.BUTTON1_MASK) == evt.BUTTON1_MASK ) {
JLabel src = (JLabel)evt.getSource();
String link = src.getText();
try {
URL url = new URL( link );
this.getAppletContext().showDocument( url, "_blank" );
}
catch (MalformedURLException mfe ) {
return;
}
}
}
COM: <s> load the url displayed with the current image in the slideshow </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.