__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/21883938 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getProximity(final String type, final String name) {
final StringBuffer sb = new StringBuffer();
sb.append("setting.").append(type + ".").append(name + ".").append(Constants.PROPERTY_RES_PROX_FIELD);
return getProject().getProperty(sb.toString());
}
COM: <s> returns the target proximity </s>
|
funcom_train/16146511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insert(final InsnList insns) {
if (insns.size == 0) {
return;
}
size += insns.size;
if (first == null) {
first = insns.first;
last = insns.last;
} else {
AbstractInsnNode elem = insns.last;
first.prev = elem;
elem.next = first;
first = insns.first;
}
cache = null;
insns.removeAll(false);
}
COM: <s> inserts the given instructions at the begining of this list </s>
|
funcom_train/22515022 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void draw(Graphics2D g2) {
ArrayList<Point2D> points = getPoints();
Stroke oldStroke = g2.getStroke();
g2.setStroke(lineStyle.getStroke());
g2.draw(getSegmentPath());
g2.setStroke(oldStroke);
startArrowHead.draw(g2, points.get(1), points.get(0));
endArrowHead.draw(g2, points.get(points.size() - 2),
points.get(points.size() - 1));
super.draw(g2);
}
COM: <s> draws the edge </s>
|
funcom_train/22203371 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOnError(String strategy) {
if ("remove".equalsIgnoreCase(strategy)) {
errorStrategy = ON_ERROR_REMOVE;
} else if ("ignore".equalsIgnoreCase(strategy)) {
errorStrategy = ON_ERROR_IGNORE;
} else if ("pass".equalsIgnoreCase(strategy)) {
errorStrategy = ON_ERROR_PASSTHROUGH;
} else {
errorStrategy = defaultErrorStrategy;
}
}
COM: <s> setting errorstrategy with a string </s>
|
funcom_train/2660108 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean execute() {
if (!col1Exists || !col2Exists) {
return true;
}
if (col1Type != col2Type) {
return true;
}
if (col1Length != col2Length) {
return true;
}
if (col1IsNullable != col2IsNullable) {
return true;
}
if (!remarksEqual()) {
return true;
}
return false;
}
COM: <s> returns a boolean indicating whether or not the two columns are different </s>
|
funcom_train/8668564 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parseContents(Parser parser) {
// Indicate to the top-level stylesheet that all templates must be
// compiled into separate methods.
Stylesheet stylesheet = getStylesheet();
stylesheet.setTemplateInlining(false);
// Get the mode we are currently in (might not be any)
Template template = getTemplate();
_modeName = template.getModeName();
_precedence = template.getImportPrecedence();
parseChildren(parser); // with-params
}
COM: <s> parse the attributes and contents of an xsl apply imports element </s>
|
funcom_train/42401510 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void onMouseDown(final MouseDownEvent event) {
Selection.clearAnySelectedText();
Selection.disableTextSelection();
final ViewportEventPreviewAdapter dragger = this.createDraggingEventPreview();
dragger.setMouseX(event.getPageX());
dragger.setMouseY(event.getPageY());
dragger.setOriginX(this.getOriginX());
dragger.setOriginY(this.getOriginY());
this.setDraggingEventPreview(dragger);
dragger.install();
event.cancelBubble(true);
event.stop();
}
COM: <s> this method is fired whenever a mouse down occurs </s>
|
funcom_train/12741181 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AlgSourceEval addSourceEval(XQueryExpression expression, Variable var, boolean islet) throws XQueryException {
ArrayList variables = null;
if (var == null)
return addSourceEval(expression, variables, islet);
variables = new ArrayList(1);
variables.add(var);
return addSourceEval(var.getParentFLWRExpression(), variables, islet);
}
COM: <s> add a new eval in the dependency tree </s>
|
funcom_train/20322766 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double integrate(String function, double min, double max) throws ConvergenceException, FunctionEvaluationException, ParseException {
logger.debug("Integration of function {} with parameters {}.", function, "Minimum value:" + min + " Maximum value:" + max);
UnivariateRealFunction f = new Real1DFunction(function);
return integrator.integrate(f, min, max);
}
COM: <s> perform integration of function f </s>
|
funcom_train/45732383 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getRawText (String locale, String textID) {
if(locale == null) {
throw new UnregisteredLocaleException("Null locale when attempting to fetch text id: " + textID);
}
if(locale.equals(currentLocale)) {
return (String)currentLocaleData.get(textID);
} else {
return (String)getLocaleMap(locale).get(textID);
}
}
COM: <s> get text for locale and exact text id only not using any fallbacks </s>
|
funcom_train/19099720 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setHighlightRow( Field columnname, Object value ) {
// tcr.setHighlightValue( columnname, value );
List<Object> temp = highlightThese.get( columnname );
if ( temp == null ) {
temp = new ArrayList<Object>( 1 );
highlightThese.put( columnname, temp );
}
temp.add( value );
}
COM: <s> highlights all rows that contain the specified value in the named column </s>
|
funcom_train/32034114 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getDestFlderSuffix(File parentFolder, File currentFolderDepth){
//create two string objects to get the absolute paths of both type of objects
String parentAbsolutePath=parentFolder.getAbsolutePath();
String currentDepthAbsolutePath=currentFolderDepth.getAbsolutePath();
//create a string object which will contain the depth of the current folder
String depth="";
//assign the depth in the object
depth=currentDepthAbsolutePath.substring(parentAbsolutePath.length());
return depth;
}
COM: <s> this method will find the suffix for the destination folder </s>
|
funcom_train/5573500 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Command getConnectionCreateCommand(CreateConnectionRequest request) {
INode node = (INode) this.getHost().getModel();
IEdge edge = (IEdge) request.getNewObject();
EdgeCreateCommand command = new EdgeCreateCommand(node, edge);
// save this command to be used later when all informations are
// available
// to create the new Edge
request.setStartCommand(command);
return command;
}
COM: <s> this is the first step taken during the creation of an edge </s>
|
funcom_train/445324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void correctValueHolderLength(int newParamCount) {
Value[] newHolder = new Value[newParamCount];
System.arraycopy(parameterValues,
0,
newHolder,
0,
Math.min(parameterValues.length,
newParamCount));
parameterValues = newHolder;
}
COM: <s> ensures that the values holder size is the same as the relation </s>
|
funcom_train/31361462 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getValue(String name) {
Object value = null;
if ( name == null || name.equals(""))
return null;
try {
Class c = this.getClass();
Method getMethod = c.getMethod("get" + name, null);
value = getMethod.invoke(this,null);
} catch (NoSuchMethodException e) {
System.out.println(e);
} catch (IllegalAccessException e) {
System.out.println(e);
} catch (InvocationTargetException e) {
System.out.println(e);
}
return value;
}
COM: <s> get a business attribute value of business entity object </s>
|
funcom_train/35079797 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void generateItems(int size) {
this.items.clear();
for (int i = 0; i <= size; i++) {
Item newItem = new Item();
newItem.setValue((int)(Math.random() * maxValue) + 1);
newItem.setWeight((int)(Math.random() * maxWeight) + 1);
this.items.add(newItem);
}
}
COM: <s> generates a set of n random items </s>
|
funcom_train/18012865 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean IsValidEcho(String OEcho){
String Echo = OEcho.trim();
if (Echo.length() < 4)
return false;
if (Echo.charAt(0)<'0' || Echo.charAt(0)>'9')
return false;
if (Echo.charAt(1)<'0' || Echo.charAt(1)>'9')
return false;
if (Echo.charAt(2)<'0' || Echo.charAt(2)>'9')
return false;
if (Echo.charAt(3)!=' ' && Echo.charAt(3)!='-')
return false;
return true;
}
COM: <s> determines whether the echo is valid </s>
|
funcom_train/32790231 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AttributeCallExp createAttributeCall(OclExpression src, String name) throws WellFormednessException{
AttributeCallExp result = factory.createAttributeCallExp();
Attribute a = typeEvl.getType(src).lookupAttribute(name);
result.setReferredAttribute(a);
result.setSource(src);
typeEvl.getType(result);
return result;
}
COM: <s> creates an instance of attribute call exp for an instance level attribute </s>
|
funcom_train/46680586 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Event makeCopy() {
Event newEvent = new Event(this.getStart(), this.getEnd(), this.getDescription(), this.getMedium(), this.getURL());
newEvent.setUDEventInformation(this.getUDEventInformation().makeCopy());
return newEvent;
}
COM: <s> returns a copy of this event </s>
|
funcom_train/44852309 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public QueryResult select(Long inGroupID) throws BOMChangeValueException {
try {
KeyObject lKey = new KeyObjectImpl();
lKey.setValue(GroupAdminHome.KEY_GROUP_ID, inGroupID);
return select(lKey);
}
catch (VException exc) {
throw new BOMChangeValueException(exc.getMessage());
}
catch (SQLException exc) {
throw new BOMChangeValueException(exc.getMessage());
}
}
COM: <s> returns the participants for the specified group </s>
|
funcom_train/49994550 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getClassName(String resourceName) {
String result = null;
try {
String temp = resourceName.substring(resourceName.lastIndexOf(".") + 1);
char first = temp.substring(0, 1).charAt(0);
if (temp.length() > 1 && Character.isUpperCase(first))
result = temp;
} catch (Exception exception) {
}
return result;
}
COM: <s> gets the class name </s>
|
funcom_train/46479101 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addInfluencedByPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ThreatActor_InfluencedBy_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ThreatActor_InfluencedBy_feature", "_UI_ThreatActor_type"),
IS1Package.Literals.THREAT_ACTOR__INFLUENCED_BY,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the influenced by feature </s>
|
funcom_train/4756045 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double value(double x, double[] parameters) {
validateParameters(parameters);
final double a = parameters[0];
final double b = parameters[1];
final double c = parameters[2];
final double d = parameters[3];
final double xMc = x - c;
return a + b * Math.exp(-xMc * xMc / (2.0 * (d * d)));
}
COM: <s> computes value of function </s>
|
funcom_train/5070251 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getRegionType(IDocument d, int offset) throws BadLocationException {
int p = ((offset == d.getLength()) ? offset - 1 : offset);
ITypedRegion region = TextUtilities.getPartition(d, fPartitioning, p, true);
return region.getType();
}
COM: <s> get partition type covering offset </s>
|
funcom_train/50345463 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Pool addPool(String name){
Pool pool = getPoolByName(name);
if (pool == null){
_idPoolNumber++;
String id = _id + "p"+ Integer.toString(_idPoolNumber);
log.debug("creating new pool ("+name+") id: " + id);
pool = new Pool(id, name);
register(pool);
}
return pool;
}
COM: <s> adds a track pool for this location </s>
|
funcom_train/36132172 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLength(double length) {
this.length = length;
//the angle only goes from -pi/2 to pi/2, so it is needed to find the correct angle
if (xf > x0){
yf = Math.sin(angle)*length+y0;
xf = Math.cos(angle)*length+x0;
}else{
if (yf >= y0){
yf = Math.sin(angle-Math.PI)*length+y0;
xf = Math.cos(angle-Math.PI)*length+x0;
}else{
yf = Math.sin(angle+Math.PI)*length+y0;
xf = Math.cos(angle+Math.PI)*length+x0;
}
}
RoadSegmentsUtil.moveAdjacentRoadSegments(this, true, true);
modelController.repaint();
}
COM: <s> changes this road segment length and calculate </s>
|
funcom_train/15491153 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fill() {
for (int y=roiY; y<(roiY+roiHeight); y++) {
int i = y * width + roiX;
for (int x=roiX; x<(roiX+roiWidth); x++)
pixels[i++] = fgColor;
if (y%20==0)
showProgress((double)(y-roiY)/roiHeight);
}
hideProgress();
}
COM: <s> fills the current rectangular roi </s>
|
funcom_train/51811886 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInitMethodExecuted() throws Exception {
instance.setTarget(runnable);
instance.setInitMethod("run");
synchronized ( instance ) {
instance.afterPropertiesSet();
assertFalse("init method run in this same thread", ran);
instance.wait();
}
assertTrue("init method didn't run", ran);
}
COM: <s> test that ensures that the init method is called in a seperate thread </s>
|
funcom_train/22024422 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void bar(Matrix3 result) {
result.set(0, 0, 0);
result.set(0, 1, m[2]);
result.set(0, 2, -m[1]);
result.set(1, 0, -m[2]);
result.set(1, 1, 0);
result.set(1, 2, m[0]);
result.set(2, 0, m[1]);
result.set(2, 1, -m[0]);
result.set(2, 2, 0);
}
COM: <s> if this is b a b </s>
|
funcom_train/1069874 | /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(WhiteboardVisualIDRegistry
.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/50864870 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addTowingTextLabel() {
try {
Component lastComponent = towingLabelPanel.getComponent(1);
if (lastComponent == towingButton) {
towingLabelPanel.remove(towingButton);
towingLabelPanel.add(towingTextLabel);
}
}
catch (ArrayIndexOutOfBoundsException e) {
towingLabelPanel.add(towingTextLabel);
}
}
COM: <s> adds the towing text label to the towing label panel </s>
|
funcom_train/32057351 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetDropEnabled() {
System.out.println("testSetDropEnabled");
jgraph.setDropEnabled( true );
boolean b = jgraph.isDropEnabled();
assertEquals( b, true );
jgraph.setDropEnabled( false );
b = jgraph.isDropEnabled();
assertEquals( b, false );
}
COM: <s> test of set drop enabled method of class jgraph </s>
|
funcom_train/16514654 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ResultSet dbQuery(String argument) {
ResultSet returnValue = null;
try {
Statement stmt = connection.createStatement(
ResultSet.TYPE_FORWARD_ONLY,
ResultSet.CONCUR_READ_ONLY);
returnValue = stmt.executeQuery(argument);
} catch (SQLException e) {
throw new RuntimeException(e.getMessage(), e);
}
return returnValue;
}
COM: <s> executes the given sql query and returns the </s>
|
funcom_train/15652149 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getTotalAmount() {
double totalAmount = 0.0f;
for (PaymentModeObject po: _mPayments) {
double amt = po.getAmount();
if(po.getTxnType().equals(TxnTypes.TXN_TYPE_REFUND)) {
totalAmount -= amt;
}
else {
totalAmount += amt;
}
}
return totalAmount;
}
COM: <s> this method returns the total amount carried by this payment instance </s>
|
funcom_train/37449950 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Experiment addXrefToPubmed(String pubmedId, Experiment experiment){
try {
Xref xref = new Xref(GeneratorHelper.getOwner(),GeneratorHelper.getPubmed(),pubmedId,null,null,GeneratorHelper.getPrimaryRef());
experiment.addXref(xref);
return experiment;
} catch (IntactException e) {
//TODO log if no pubmed
return null;
}
}
COM: <s> create and add the xref pubmed primary ref to the experiment </s>
|
funcom_train/7384659 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public mxCellState getState(Object cell, boolean create) {
mxCellState state = null;
if (cell != null) {
state = (mxCellState) states.get(cell);
if (state == null && create && graph.isCellVisible(cell)) {
state = createState(cell);
states.put(cell, state);
}
}
return state;
}
COM: <s> returns the cell state for the given cell </s>
|
funcom_train/36426077 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean check(DList<Binding> bindingList) {
if (this.conditions == null) {
return true;
}
for (Condition cond : this.conditions) {
if (!cond.check(bindingList)) // modifies bindingList
break;
}
return (bindingList.size() == 0) ? false : true;
}
COM: <s> establish contexts generate the binding list </s>
|
funcom_train/3516380 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void notifyFederation(DUID id) throws RemoteException {
// notify all the members of the federation
EventEntry evt = new EventEntry(id.getHost(),
Constants.CHANGED_PROPERTIES);
evt.addAttribute(Constants.DDSO_ID, id);
evt.addAttribute(Constants.CHANGED_VISIBILITY, new Boolean(false));
/* throws RemoteException */
dispatchEvent(evt, null);
}
COM: <s> send the appropriate event to all registered members of the federation </s>
|
funcom_train/50156941 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getStartGrade() {
// return MetadataConstraints.ANY_GRADE;
int min = Integer.MAX_VALUE;
if (selectedGradeRanges == null || !getUseGradeRanges()) {
prtln("getEndGrade: selectedGradeRanges is null");
return MetadataConstraints.ANY_GRADE;
}
for (int i = 0; i < selectedGradeRanges.length; i++) {
min = Math.min(min, standardsMapper.getStartGrade(selectedGradeRanges[i]));
}
if (min == Integer.MAX_VALUE)
min = MetadataConstraints.ANY_GRADE;
return min;
}
COM: <s> compute a start grade value based on selected grade ranges </s>
|
funcom_train/50221319 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void valueChanged(EventObject e) {
Object result = e.getSource();
for (int i = 0; i<elements.size(); i++) {
GraphObject gObj = elements.elementAt(i);
gObj.putAttribute(key, result);
tgModel.elementChanged(gObj);
}
}
COM: <s> tell the model that an attribute has changed for all my elements </s>
|
funcom_train/33567162 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int addItem(PictureListBoxItem<? extends Object> item) {
if (item == null)
throw new IllegalStateException("PictureListBoxItem cannot be null");
if (items.contains(item))
return this.getIndex(item);
if (items.add(item)) {
int index = getIndex(item);
showItem(item, index);
return index;
} else {
return -1;
}
}
COM: <s> adds an item to the listbox at the end </s>
|
funcom_train/10615320 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object other) {
if (this == other) {
return true;
}
if (other instanceof CertPath) {
CertPath o = (CertPath)other;
if (getType().equals(o.getType())) {
if (getCertificates().equals(o.getCertificates())) {
return true;
}
}
}
return false;
}
COM: <s> returns true if code certificate code s in the list are the same </s>
|
funcom_train/3090117 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean subEval(String s) {
s = s.trim();
boolean result = defines.nameExists(s);
if (!result) {
if (s.equals("1")) result = true;
} else {
if (s.equals("0")) result = false;
}
println("subEval(" + s + ") = " + result, Config.OUTPUT_LEVEL_MAX);
return result;
}
COM: <s> helper method for code eval java </s>
|
funcom_train/11322863 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testOnProcessWithoutRequestParameter() {
MockContext context = MockContext.initContext();
Field field = new TextField("text");
field.setRequired(true);
assertEquals("", field.getValue());
String expectedValue = "";
field.onProcess();
assertEquals(expectedValue, field.getValue());
assertTrue(field.isValid());
}
COM: <s> test field on process if the fields request parameter is not available </s>
|
funcom_train/20766881 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void labelRightEye (AEPacketRaw aeRawRight){
int[] adr = aeRawRight.getAddresses();
int n = aeRawRight.getNumEvents();
for ( int i = 0 ; i < n ; i++ ){
adr[i] = (int)( adr[i] | Stereopsis.MASK_RIGHT_ADDR );
}
}
COM: <s> labels all events in raw packet as coming from right eye </s>
|
funcom_train/43334991 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void parseBitBashParam(SimulinkBlock block){
// removing all the HTML tags
String[] expression = block.getValue("bitexpr").replaceAll("\\<.*?>", "").replaceAll("\"", "").split("\\\\n");
for(int i = 4; i < expression.length; i++){
block.addParameter("bitexpr" + (i - 3), expression[i]);
}
}
COM: <s> removes the html tags that are in the bit bashers parameter list </s>
|
funcom_train/8019501 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ResourceReference getDojoResourceReference() {
if (Application.get().getMetaData(USE_CUSTOM_DOJO_DIST) == null
|| !(Application.get().getMetaData(USE_CUSTOM_DOJO_DIST) instanceof CompressedResourceReference)) {
return DOJO;
} else {
return (CompressedResourceReference) Application.get().getMetaData(
USE_CUSTOM_DOJO_DIST);
}
}
COM: <s> get the reference to the dojo scripts </s>
|
funcom_train/3858249 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireTreeNodesChanged(Object[] path) {
TreeModelEvent e = new TreeModelEvent(this, path);
for (int i = 0; i < myListeners.size(); i++) {
TreeModelListener listener = (TreeModelListener) myListeners.get(i);
listener.treeNodesChanged(e);
}
}
COM: <s> the only event raised by this model is tree snode changed with the </s>
|
funcom_train/10511921 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getRelativePath() throws IOException, BuildException {
if (!relativePathCalculated) {
if (parent != null) {
traversesSymlinks = parent.isTraverseSymlinks();
relativePath = getRelativePath(parent.getAbsolutePath(),
parent.getRelativePath());
} else {
relativePath = getRelativePath(rootPath, "");
relativePathCalculated = true;
}
}
return relativePath;
}
COM: <s> find out the relative path to the root path of the enclosing scanner </s>
|
funcom_train/18219783 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void readChildSCMDB() {
Element scmDBsettings = settings
.getChild(CoreConfigurationBugzillaUsingScm.SCM_DB);
databaseName = getAttribute(scmDBsettings, "database", "scm");
dbUserName = getAttribute(scmDBsettings, "user", "bugs");
dbUserPassword = getAttribute(scmDBsettings, "password", "bugs");
dbHost = getAttribute(scmDBsettings, "host", "localhost");
}
COM: <s> loads all information from scm dbsettings child element of scm in </s>
|
funcom_train/8028087 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveProperties(final Properties properties) {
properties.setProperty(property("dir"), getDirectory());
properties.setProperty(property("format"), accessory.filetypeComboBox.getSelectedItem().toString());
for (CorpusFormat format : formats.values())
format.saveProperties(properties, id);
}
COM: <s> saves the properties of this loader to the given properties object </s>
|
funcom_train/16786187 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(Page page, String category) throws RQLException {
Set<Page> setOrNull = getPages(category);
// lazy initialize set
if (setOrNull == null) {
setOrNull = new HashSet<Page>();
categoryMap.put(category, setOrNull);
}
// reduce memory footprint of page
if (freeOccupiedPageMemory) {
page.freeOccupiedMemory();
}
// add page
setOrNull.add(page);
}
COM: <s> adds the given page under the given category </s>
|
funcom_train/3472441 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private long calculateProcTime(long currentProcTime) {
long sum = currentProcTime;
long calculatedTime = currentProcTime;
int counter = 1;
if (procTimes.size() > 0) {
for (int i = 0; i < procTimes.size(); i++) {
sum += procTimes.get(i).longValue();
counter++;
}
calculatedTime = sum / counter;
}
return calculatedTime;
}
COM: <s> p method which calculates the correct processing time in this </s>
|
funcom_train/33741253 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() {
try {
if (cur != null) cur.close();
txn.commit();
db.close();
env.close();
log.log(Level.INFO, "Database handles closed");
} catch (DatabaseException dbe) {
log.log(Level.SEVERE, dbe.getMessage());
}
}
COM: <s> closes the underlying database </s>
|
funcom_train/35742622 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RendezvousConnectionMetric getRendezvousConnectionMetric(PeerID peerID) {
for (Iterator i = rendezvousConnectionMetrics.iterator(); i.hasNext();) {
RendezvousConnectionMetric rendezvousConnectionMetric = (RendezvousConnectionMetric) i.next();
if (peerID.equals(rendezvousConnectionMetric.getPeerID())) {
return rendezvousConnectionMetric;
}
}
return null;
}
COM: <s> get the rendezvous connection metrics for each peers id </s>
|
funcom_train/44216649 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getSelectedParentElementId() {
DefaultMutableTreeNode selected = getSelectedNode();
if(selected == null || selected == root) return null;
DefaultMutableTreeNode parent = (DefaultMutableTreeNode)(selected.getParent());
if(parent == null || parent == root) return null;
return (String)(parent.getUserObject());
}
COM: <s> returns null if selected element is root or parent is root </s>
|
funcom_train/22571350 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // private void editDescription() {
// TextEditorDialog dialog = new TextEditorDialog(Display.getCurrent().getActiveShell(),
// Messages.CompetenceProfileEditor_8,
// Messages.CompetenceProfileEditor_9);
//
// dialog.setText(fCompetenceProfile.getDescription());
//
// if(dialog.open() == IDialogConstants.OK_ID) {
// String text = dialog.getText();
// fCompetenceProfile.setDescription(text);
// setDirty(true);
// }
// }
COM: <s> edit the description </s>
|
funcom_train/39949200 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButtonRestartWarpTime() {
if (jButtonRestartWarpTime == null) {
jButtonRestartWarpTime = new JButton();
jButtonRestartWarpTime.setText("Reset");
jButtonRestartWarpTime.setEnabled(false);
jButtonRestartWarpTime.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent arg0) {
VirtualClock.getInstance().restartWarpingTime();
}});
}
return jButtonRestartWarpTime;
}
COM: <s> this method initializes j button restart warp time </s>
|
funcom_train/45027616 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isUserInGroup(User otherUser) {
boolean duplicateUser = false;
if (otherUser != null) {
Iterator users = this.getUsersIter();
while (users.hasNext()) {
User memberUser = (User) users.next();
if (memberUser.equals(otherUser)) {
duplicateUser = true;
}
}
}
return duplicateUser;
}
COM: <s> checks if the parameter user is part of this group </s>
|
funcom_train/13391202 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setConfiguration(Configuration conf) {
defaultConfig = conf;
if(logger.isLoggable(Level.FINE)) {
if(defaultConfig==null)
logger.fine("Set null configuration for DiscoveryManagementPool");
else
logger.log(Level.FINE,
"Set configuration for DiscoveryManagementPool {0}",
new Object[] {defaultConfig});
}
}
COM: <s> set the configuration property </s>
|
funcom_train/20948427 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeNumber(int number) {
if (numbers.contains(number)) {
// check if this number is from the event
Calendar cal = Calendar.getInstance();
cal.setTime(event.getStartDate());
if (number == cal.get(FIELDS[frequency])) {
// don't remove it
return;
}
numbers.remove(number);
firePropertyChange(NUMBER_REMOVED, number, null);
}
}
COM: <s> removes number from the list </s>
|
funcom_train/29829656 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fireMessageRead(Message msg) {
for (Enumeration e = msgListeners.elements(); e.hasMoreElements(); ) {
BSMessageListener listener = (BSMessageListener) e.nextElement();
//listener.messageRead(msg.getFromAddress());
listener.messageRead(msg);
}
}
COM: <s> notifies message listeners that a message from </s>
|
funcom_train/48877581 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Discount create() throws DataException {
String id = null;
try {
id = GUID.generate();
} catch(GUIDException guide) {
throw new DataException("Could not generate a GUID", guide);
}
Discount discount = new Discount();
discount.setID(id);
Cache cache = Cache.getInstance();
cache.put(id, discount);
return discount;
} //create
COM: <s> creates a new discount business object </s>
|
funcom_train/18135235 | /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 (evt.getPropertyName() == Task.INPUT_PORTS_FIELD
|| evt.getPropertyName() == Task.OUTPUT_PORTS_FIELD
|| (evt.getSource() instanceof Port && evt.getPropertyName() == Port.NAME_FIELD)) {
if (evt.getSource() instanceof Task)
setEditingTask((Task) evt.getSource());
}
}
COM: <s> method for when a property change occurs </s>
|
funcom_train/37901687 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAll(Sequence other) throws XPathException {
if (!other.isEmpty() && !Type.subTypeOf(other.getItemType(), Type.NODE))
throw new XPathException("sequence argument is not a node sequence");
for (SequenceIterator i = other.iterate(); i.hasNext();) {
add(i.nextItem());
}
}
COM: <s> add all items from the given sequence to the node set </s>
|
funcom_train/1941019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getUIFormClientId(FacesContext context, UIComponent component) {
UIComponent parentComponent = component;
while (parentComponent != null && !(parentComponent instanceof UIForm)) {
parentComponent = parentComponent.getParent();
}
if (parentComponent == null) {
throw new PaginationException("This tag must be used inside HTML Form tag");
}
return parentComponent.getClientId(context);
}
COM: <s> get client id of enclosing uiform of the specified ui component </s>
|
funcom_train/36616877 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean flashBacklight(int duration) {
// Grey area of Spec.:
// The spec. does not specify when negative number
// is passed into this function AND the Display is not
// in the foreground. To be safe here, we always
// check for the parameters first.
if (duration < 0) {
throw new IllegalArgumentException();
}
return false;
}
COM: <s> requests a flashing effect for the devices backlight </s>
|
funcom_train/25997696 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void locationPolled(Location loc) {
int latitude = (int) (loc.getLatitude() * 1E6);
int longitude = (int) (loc.getLongitude() * 1E6);
log("Location chaged to (lng, lat) = (" + longitude + ", " + latitude
+ ")");
if (history.size() >= HISTORY_SIZE)
history.removeFirst();
history.addLast(loc);
if (notifyList.size() > 0)
{
for (LocationListener listener : notifyList)
listener.onLocationChanged(loc);
}
updateDB(loc);
}
COM: <s> cares the new polled location </s>
|
funcom_train/11687781 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getFaultsSending() {
if (endpoint.getChildren() != null) {
long faultsSending = 0;
for (Endpoint e : endpoint.getChildren()) {
if (e.getMetricsMBean() != null) {
faultsSending += e.getMetricsMBean().getFaultsSending();
}
}
return faultsSending;
} else {
return faultsSending;
}
}
COM: <s> number of faults sending </s>
|
funcom_train/3743194 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String convertDateToXML(String date) {
if (date.length() < 9) {
return DateBean.convertDate("yyyyMMdd", "yyyy-MM-dd", date);
} else {
return DateBean.convertDate("yyyyMMdd HHmmss", "yyyy-MM-dd HH:mm:ss", date);
}
}
COM: <s> converts a date from contineos internal representation to a valid xml </s>
|
funcom_train/44709955 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireActionEvent(PageState state) {
ActionEvent e = null;
if (m_actionListeners == null) {
return;
}
for (Iterator i=m_actionListeners.iterator(); i.hasNext(); ) {
if ( e == null ) {
e = new ActionEvent(this, state);
}
((ActionListener) i.next()).actionPerformed(e);
}
}
COM: <s> fires an code action event code </s>
|
funcom_train/23278668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addMember(DirttAward da, DirttMember member){
if(!validateClass(da)) throw new ARISException("Invalid DirttAward");
if(!validateClass(member)) throw new ARISException("Invalid DirttMember");
getHibernateTemplate().save(member);
getHibernateTemplate().update(da);
}
COM: <s> adds the dirtt member to the database and updates the dirtt award </s>
|
funcom_train/43589937 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextArea getChangesTextArea() {
if (changesTextArea == null) {
changesTextArea = new JTextArea();
changesTextArea.setPreferredSize(new Dimension(400, 160));
changesTextArea.setBorder(LineBorder.createBlackLineBorder());
changesTextArea.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);
changesTextArea.setFont(new Font("Verdana", Font.PLAIN, 12));
changesTextArea.setEditable(false);
}
return changesTextArea;
}
COM: <s> this method initializes changes text area </s>
|
funcom_train/8664364 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Writer write(final Writer writer) throws JSONException {
try {
boolean b = false;
final int len = this.length();
writer.write('[');
for (int i = 0; i < len; i += 1) {
if (b) {
writer.write(',');
}
final Object v = this.myArrayList.get(i);
if (v instanceof JSONObject) {
((JSONObject) v).write(writer);
} else if (v instanceof JSONArray) {
((JSONArray) v).write(writer);
} else {
writer.write(JSONObject.valueToString(v));
}
b = true;
}
writer.write(']');
return writer;
} catch (final IOException e) {
throw new JSONException(e);
}
}
COM: <s> write the contents of the jsonarray as json text to a writer </s>
|
funcom_train/1952787 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PlayLightScript createPlayLightScriptCmd(String addr, int scriptID, int reps, int pos) {
PlayLightScript playLightScript = stampCmd(CommandsFactory.eINSTANCE.createPlayLightScript());
playLightScript.setAddr(Byte.decode(addr));
playLightScript.getArguments()[0] = (byte) scriptID;
playLightScript.getArguments()[1] = (byte) reps;
playLightScript.getArguments()[2] = (byte) pos;
return playLightScript;
}
COM: <s> play light script </s>
|
funcom_train/3840443 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendData(String odata) {
try {
// _outputData.println(new String(odata.getBytes(), _encoding));
debugPrintln("Sent: " + odata);
_outputData.writeUTF(odata);
_outputData.flush();
} catch (java.io.IOException uee) {
debugPrintln("This character encoding is not supported!");
}
}
COM: <s> sends the string code odata code to the server </s>
|
funcom_train/38829659 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeTree(Tree<F> t) {
if (contains(t)) {
GenFTACreator<F,NumberedState> fc = new GenFTACreator<F,NumberedState>();
NumberedStateConstructor<Object> treeToState = new NumberedStateConstructor<Object>();
GenFTA<F,NumberedState> A_t = FTAOps.computeSingletonFTA(t, fc, treeToState);
RegularTreeLanguage<F> L_t = new RegularTreeLanguage<F>();
L_t.underlyingFTA = A_t;
removeTrees(L_t);
}
}
COM: <s> removes a tree from this language if it is contained </s>
|
funcom_train/27694487 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void register(DeclaredType ct) {
Debug.assert(ct);
String name = ct.getFullName();
Object ob = name2type.put(name, ct);
if (ob != null && ob != ct) {
Debug.log(
"Internal Warning - Multiple registration of "
+ Format.toString("%N [%i]", ct)
+ Format.toString(" --- was: %N [%i]", (ProgramModelElement) ob));
}
}
COM: <s> registers a class type into the type map </s>
|
funcom_train/32056540 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRead1() {
TPGraphModelFileFormatXML tpxml = new TPGraphModelFileFormatXML();
//empty implementation
try {
GraphModel model = tpxml.read( "tpjunit.tpb", new Hashtable(), new GPGraph() );
assertNull( model );
} catch( Exception e ) {
fail();
}
}
COM: <s> this function tests read function of tpgraph model file format xml class </s>
|
funcom_train/9644164 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isTooSmall(JLabel label) {
boolean hasText = label.getText().length() > 0;
try {
if (Integer.parseInt(label.getText()) == 0) {
hasText = false;
}
} catch (NumberFormatException e) {
// Ok, it's normal text.
}
return (label.getPreferredSize().width > label.getWidth()) && hasText;
}
COM: <s> checks if the cell is too small </s>
|
funcom_train/10514792 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void resolveAllProperties(Map props) throws BuildException {
PropertyHelper propertyHelper
= (PropertyHelper) PropertyHelper.getPropertyHelper(getProject());
new ResolvePropertyMap(
getProject(),
propertyHelper,
propertyHelper.getExpanders())
.resolveAllProperties(props, getPrefix(), getPrefixValues());
}
COM: <s> resolve properties inside a properties hashtable </s>
|
funcom_train/19971278 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getSetTest() throws IOException {
assertEquals(v1.get(0), values[0][0]);
boolean ex = false;
try {
v1.get(5);
} catch (NullPointerException e) {
ex = true;
}
assertTrue(ex);
assertEquals(m1.getColumn(0).size(), 2);
}
COM: <s> test get set methods </s>
|
funcom_train/3617683 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getCellEditorValue() {
Float amount = new Float(0);
try {
String amountStr = ((JTextField) component).getText();
amount = new Float(Float.parseFloat(amountStr));
} catch (NumberFormatException nfe) {
System.err.println(nfe.getMessage());
}
return amount;
}
COM: <s> returns the value contained in the editor </s>
|
funcom_train/18525587 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void exitApplication() {
// store the usersettings
UserProperties.getReference().storeProperties();
// try to delete the tmp-directory
StringBuffer path = new StringBuffer(NULLSIZE);
path.append(USERDIR).append(DiscManagement.FILE_SEPARATOR);
path.append(".jptc").append(DiscManagement.FILE_SEPARATOR);
path.append("tmp");
File file = new File(path.toString());
if (file.exists() && file.isDirectory()) {
DiscManagement.deleteDirectory(path.toString());
}
// and exit
System.exit(0);
}
COM: <s> exit the application </s>
|
funcom_train/18744979 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getPointString(Point2D point, boolean usePar) {
double x = point.getX();
double y = point.getY();
StringBuilder s = new StringBuilder();
appendPoint(x, y, usePar, s);
return s.toString();
}
COM: <s> converts a point to a string </s>
|
funcom_train/12686293 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMinimum(double min) {
this.min = min;
// convert min and max to String by adding ""
setColumns(Math.max(("" + min).length(), ("" + max).length()) * 3 / 4);
((DoubleDocument) getDocument()).setMinimum(min);
}
COM: <s> set minimal value and adjust textfield length </s>
|
funcom_train/11375307 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void finalizeNamenode(NameNode nn, Configuration conf) throws Exception {
if (nn == null) {
throw new IllegalStateException("Attempting to finalize "
+ "Namenode but it is not running");
}
ToolRunner.run(new DFSAdmin(conf), new String[] {"-finalizeUpgrade"});
}
COM: <s> finalize the namenode </s>
|
funcom_train/24533744 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void moved(EStructuralFeature feature, Object value, int oldPosition, int newPosition, IExpression expression) {
// The default is to do a remove followed by add.
int mark = expression.mark();
try {
canceled(feature, value, oldPosition, expression);
} finally {
expression.endMark(mark);
}
mark = expression.mark();
try {
applied(feature, value, newPosition, false, expression, false);
} finally {
expression.endMark(mark);
}
}
COM: <s> default implementation of move of feature has occurred </s>
|
funcom_train/1853615 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showView(String panelName) {
if (panelName == null)
return;
for (Iterator<?> iter = calendarViews.values().iterator(); iter.hasNext();) {
AbstractCalendarView panel = ( AbstractCalendarView ) iter.next();
if (panelName.equals(panel.getButton().getActionCommand())) {
panel.getButton().doClick();
return;
}
}
}
COM: <s> show the specified view </s>
|
funcom_train/46740299 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValueUnitRef(DisplayModel valueUnitRef) {
if (Converter.isDifferent(this.valueUnitRef, valueUnitRef)) {
DisplayModel oldvalueUnitRef= new DisplayModel(this);
oldvalueUnitRef.copyAllFrom(this.valueUnitRef);
this.valueUnitRef.copyAllFrom(valueUnitRef);
setModified("valueUnitRef");
firePropertyChange(String.valueOf(SETTINGVALUES_VALUEUNITREFID), oldvalueUnitRef, valueUnitRef);
}
}
COM: <s> quantitative values stored in the setting value are measure in these units </s>
|
funcom_train/25825648 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void notifyLanguageChange(String languageCode, String country) {
LanguageManager.changeLanguage(languageCode, country);
gui.getContent().setDescriptionData(reader.getSimulationDescriptionInfo());
gui.getContent().refreshGUI();
// update canvas - problems with SWING GUI updates...
canvas.invalidate();
canvas.repaint();
canvas.display();
canvas.requestFocus();
}
COM: <s> got notification about language change so refresh the gui </s>
|
funcom_train/5728094 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object object) {
if (this == object) {
return true;
}
if (!(object instanceof TemplateParameter)) {
return false;
}
final TemplateParameter that = (TemplateParameter) object;
if (this.id == null || that.getId() == null || !this.id.equals(that.getId())) {
return false;
}
return true;
}
COM: <s> returns code true code if the argument is an template parameter </s>
|
funcom_train/5600421 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public E next() {
if (next == null) {
throw new NoSuchElementException();
}
previous = next;
next = null;
while (++elementIndex < elements.length) {
final E candidate = elements[elementIndex];
if (candidate.indexOf(type) != 0) {
next = candidate;
break;
}
}
iteratorIndex++;
assert previous.indexOf(type) == iteratorIndex : previous;
return previous;
}
COM: <s> returns the next element in the list </s>
|
funcom_train/1973493 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reverseSort(int column) {
Object sort = currentSortMap.get(new Integer(column));
boolean forward = true;
if (sort != null) {
if (((Integer) sort).intValue() == TableRowComparator.SORT_FORWARD) {
forward = false;
}
}
sort(column, forward);
}
COM: <s> reverses the current sort direction </s>
|
funcom_train/37503274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetLocator() throws SAXException {
CreationHandlerImpl h1 = new CreationHandlerImpl();
Locator l1 = new LocatorImpl();
h1.setLocator(l1);
try {
h1.handle_answer(null, null);
fail("did not catch outer answer");
} catch (SAXParseException ex) {
assertEquals("locator match", l1.getPublicId(), ex.getPublicId());
}
}
COM: <s> test of set locator method of class saga </s>
|
funcom_train/36873965 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List listLastRegisteredUsers(int usersCount) {
getHibernateTemplate().setMaxResults(usersCount);
List result = getHibernateTemplate().find(" from " + Author.class.getName() +
" a where a.blocked = 0 order by a.registerDate desc");
getHibernateTemplate().setMaxResults(0);
return result;
}
COM: <s> returns list of last registered users </s>
|
funcom_train/35327125 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MethodType primsAsInts() {
MethodType ct = primsAsInts;
if (ct != null) return ct;
MethodType t = erasedType;
ct = canonicalize(t, RAW_RETURN, INTS);
if (ct == null) ct = t; // no prims to int-ify
return primsAsInts = ct;
}
COM: <s> turn all primitive types to either int or long </s>
|
funcom_train/28170917 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddPoint() {
System.out.println("addPoint");
double x = 0.0;
double y = 0.0;
BezierPath instance = new BezierPath();
instance.addPoint(x, y);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of add point method of class org </s>
|
funcom_train/29793270 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String typeParameters(Options opt, ParameterizedType t) {
String tp = "";
if (t == null)
return tp;
Type args[] = t.typeArguments();
tp += "<";
for (int i = 0; i < args.length; i++) {
tp += type(opt, args[i]);
if (i != args.length - 1)
tp += ", ";
}
tp += ">";
return tp;
}
COM: <s> print the parameters of the parameterized type t </s>
|
funcom_train/32958884 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DataModel getMyProviders() {
if (myProviders==null) {
myProviders = new ListDataModel();
myProviders.setWrappedData(getProviderBean().findMyActiveProviders( this.getSessionAccountId()));
// TolvenLogger.info( "Show Inactive=" + TolvenRequest.getInstance().isShowProviderInactive(), ProviderAction.class);
}
return myProviders;
}
COM: <s> action method that gets a list of the patients providers </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.