__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/7662513 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNanos(int n) throws IllegalArgumentException {
if ((n < 0) || (n > 999999999)) {
// sql.0=Value out of range
throw new IllegalArgumentException(Messages.getString("sql.0")); //$NON-NLS-1$
}
nanos = n;
}
COM: <s> sets the nanosecond value for this </s>
|
funcom_train/30349959 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addChild(ViewGroup group, TreeItemEx item) {
for( Iterator iter = group.getChildren().iterator(); iter.hasNext(); ){
ViewGroup nextGroup = (ViewGroup)iter.next();
TreeItemEx nextItem = addView(nextGroup);
item.addItem(nextItem);
addChild((ViewGroup) nextGroup, nextItem);
}
}
COM: <s> add child group to tree </s>
|
funcom_train/47824614 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String uninstallBundle(String param) {
long number;
try{
number = Long.parseLong(param);
}catch(NumberFormatException e)
{
return ERR+"Invalid bundle number in call to 'uninstall'.\n"+e.getMessage();
}
Bundle bundle = context.getBundle(number);
if(bundle==null)
{
return ERR+"Bundle number does not exist.\n";
}
try {
bundle.uninstall();
} catch (BundleException e) {
return ERR+"Bundle could not be uninstalled.\n"+e.getMessage();
}
return OK;
}
COM: <s> uninstalls a bundle </s>
|
funcom_train/44216238 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void init(PounderPrefs prefs, TestInstanceFactory tif, RecordingRecord record, ClassLoader cl) {
this.prefs = prefs;
this.testInstanceFactory = tif;
this.record = record;
this.classLoader = cl;
this.stopRequested = false;
this.disposeWindows = true;
this.paused = false;
this.windowWatcher = buildWindowWatcher();
}
COM: <s> initializer member varaiables </s>
|
funcom_train/3762245 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDependency(String name, String type, String to){
Object[] newDependency = new Object[3];
newDependency[0] = name;
newDependency[1] = type;
newDependency[2] = to;
m_rows.add(newDependency);
int lastElem = m_rows.size()-1;
fireTableRowsInserted(lastElem, lastElem);
}
COM: <s> adds the dependency to the list </s>
|
funcom_train/44130589 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddGlobalAttributeDefinition() {
AttributeDefinition attrdef = new AttributeDefinition();
sysdef.addGlobalAttributeDefinition(attrdef);
AttributeDefinition af = new AttributeDefinition("1", "User Registration", "Attribute", "User registration - Iteration 1");
assertTrue("Doesn't contain attribute definition attrdef", sysdef.getWorkflowDefintions().contains(attrdef));
assertTrue("Doesn't contain attribute definition af", sysdef.getWorkflowDefintions().contains(af));
}
COM: <s> test of testadd global attribute definition method of class com </s>
|
funcom_train/49349943 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComboBox getSeparatorComboBox() {
ComboBoxItem[] items = {
new ComboBoxItem(resource.getString("tab"), "\t"),
new ComboBoxItem(resource.getString("comma"), ","),
new ComboBoxItem(resource.getString("semicolon"), ";") };
if (separatorComboBox == null) {
separatorComboBox = new JComboBox(items);
separatorComboBox.setEditable(false);
}
return separatorComboBox;
}
COM: <s> this method initializes separator combo box </s>
|
funcom_train/19399286 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public int remove(int index) {
assert index >= 0 && index < nkeys;
/*
* Copy down to cover up the hole.
*/
final int length = nkeys - index - 1;
if(length > 0) {
System.arraycopy(keys, index + 1, keys, index, length);
}
keys[--nkeys] = null;
return nkeys;
}
COM: <s> remove a key in the buffer at the specified index decrementing the of </s>
|
funcom_train/50329677 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected float floatSpeed(int lSpeed) {
if (lSpeed == 0) return 0.f;
else if (lSpeed == 1) return -1.f; // estop
else if (super.speedStepMode == SpeedStepMode128)
return ( (lSpeed-1)/126.f);
else
return (int)(lSpeed * 27.f + 0.5) + 1 ;
}
COM: <s> convert a ecos speed integer to a float speed value </s>
|
funcom_train/12923036 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FocalGradientFill add(final Gradient gradient) {
if (gradient == null) {
throw new IllegalArgumentException();
}
if (gradients.size() == Gradient.MAX_GRADIENTS) {
throw new IllegalStateException(
"Maximum number of gradients exceeded.");
}
gradients.add(gradient);
return this;
}
COM: <s> add a gradient object to the list of gradient objects </s>
|
funcom_train/44950207 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RenderedImage getTitleImage(File comicFile, ImageInCacheListener listener) {
assertSetUpCalled();
assert comicFile != null;
assert listener != null;
RenderedImage result;
try {
result = titleCache.get(comicFile, listener);
} catch (IOException error) {
result = titleCache.createBrokenImage();
}
assert result != null;
return result;
}
COM: <s> get thumbnail for title image for code comic file code </s>
|
funcom_train/191705 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void buildChart() {
Point size = getSize();
Bounds bo = BoundsImpl.create(0, 0, size.x, size.y);
int resolution = render.getDisplayServer().getDpiResolution();
bo.scale(72d / resolution);
try {
Generator gr = Generator.instance();
state = gr.build(render.getDisplayServer(), chart, bo, null, null,
null);
} catch (ChartException ex) {
ex.printStackTrace();
}
}
COM: <s> builds the chart state </s>
|
funcom_train/17004880 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getNumberOfInputFilters() {
int index = 0;
int numOfInputFilters = 0;
ListIterator listIterator = filterLinkedList.listIterator(index) ;
while (listIterator.hasNext()) {
Filter filter = (Filter) listIterator.next() ;
if (filter.isInputFilter()) {
numOfInputFilters++;
}
}
return numOfInputFilters;
}
COM: <s> gets the total number of input filters </s>
|
funcom_train/14225700 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ProcessHandler buildProcess() throws ExecutionException {
JavaParameters params = new JavaParameters();
params.setJdk(configuration.getJdk());
params.setMainClass(configuration.getMainClass());
params.getVMParametersList().add(configuration.getVmParameters());
params.setWorkingDirectory(configuration.getHomePath());
configureApplicationParameters(params);
configureClassPath(params);
return new DefaultJavaProcessHandler(params);
}
COM: <s> configure the jvm process handler with jdk main class vm params etc </s>
|
funcom_train/9675498 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void step(){
boolean error = false;
for (Component c: components)
try {
c.readFromConectors();
} catch (IllegalChange e) {
error = true;
}
if (error){
try {
setState(CircuitState.HALTED);
} catch (IllegalChange e) {
e.printStackTrace();
}
return;
}
for (Component c: components)
try {
c.update();
} catch (BreakPoint b){
error = true;
}
if (error)
try {
setState(CircuitState.HALTED);
} catch (IllegalChange e) {
e.printStackTrace();
}
for (Component c: components)
c.writeToConectors();
}
COM: <s> simultaneus update of all the components </s>
|
funcom_train/32213017 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doStart() {
synchronized(this) {
String folderName = this.getFolderName();
String filenameExtensions[] = this.getFilenameExtensions();
}
String foundFilenames[] = this.searchFolderForFilenamesWithExtensions
(folderName, filenameExtensions);
synchronized(this) {
this.setFoundFilenames(foundFilenames);
}
}
COM: <s> search the target folder for filenames </s>
|
funcom_train/207356 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createDirectory(String directory) throws GeneralException {
try {
String currentPath = getCurrentDirectory();
this.resource = new File(resolveName(directory));
resource.mkdir();
setCurrentDirectory(currentPath);
} catch (Exception e) {
throw new GeneralException("Could not create directory: "
+ directory);
}
}
COM: <s> make a new directory </s>
|
funcom_train/36683741 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRectangleIntersection() {
GeometricParameters bodyA = new GeometricParameters(ShapeFactory
.JavaCircle(5), new Vector2f(0, 0));
GeometricParameters bodyB = new GeometricParameters(ShapeFactory
.JavaRectangle(3, 5), new Vector2f(5, 5));
JavaShapeIntersector intersector = new JavaShapeIntersector(bodyA,
bodyB);
List<Vector2f> list = intersector.findIntersections();
System.out.println(list);
}
COM: <s> tests the intersection of a circle and a rectangle </s>
|
funcom_train/27948219 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Cell search(int icell, int jcell) {
int i;
Cell current = null;
if( cells.isEmpty() )
return null;
for(i=0; i<cells.size(); i++) {
current = (Cell)(cells.elementAt(i));
if(current.i == icell && current.j == jcell)
return current;
}
return null;
}
COM: <s> search for a cell in the contour cell list </s>
|
funcom_train/17945493 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(Object obj) {
checkConcurrentModification();
if (filter.canAdd(obj)) {
last++;
ContentList.this.add(last, obj);
}
else {
throw new IllegalAddException("Filter won't allow add of " +
(obj.getClass()).getName());
}
expected = ContentList.this.getModCount();
lastOperation = ADD;
}
COM: <s> inserts the specified element into the list </s>
|
funcom_train/4971221 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNumber(BigDecimal minValue, BigDecimal maxValue, boolean onlyPositiveValues, boolean disableFractionPart) {
net.sourceforge.xsurvey.xscreator.xjc.Number n = question.getAnswertype().getNumberfield();
n.setMinValue(minValue);
n.setMaxValue(maxValue);
n.setOnlyPositiveValues(onlyPositiveValues);
n.setDisableFractionPart(disableFractionPart);
}
COM: <s> define field of answer </s>
|
funcom_train/3773025 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Service getDefaultStoreInstance() {
if (defaultStoreInstance != null)
return defaultStoreInstance;
try {
defaultStoreInstance =
(Service)Class.forName(defaultStore).newInstance();
defaultStoreInstance.setParameters(this.parameters);
} catch (Throwable t) {
// Should never happen ...
t.printStackTrace();
}
return defaultStoreInstance;
}
COM: <s> return the default store instance </s>
|
funcom_train/23928687 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void modifyProcessing(String evaluator, Map<String, String> evaluators, List<Double> weights, double rate) {
int i = 0;
double newValue;
for (Entry<String, String> entry : evaluators.entrySet()) {
if (entry.getKey().equals(evaluator)) {
// Modify weight
newValue = weights.get(i) * rate;
weights.set(i, newValue);
break;
}
i++;
}
}
COM: <s> helper method to modify weight of a certain evaluator </s>
|
funcom_train/2490615 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void verifyBufferSize(int sz) {
if (sz > buf.length) {
byte[] old = buf;
buf = new byte[Math.max(sz, 2 * buf.length )];
System.arraycopy(old, 0, buf, 0, old.length);
old = null;
}
}
COM: <s> ensures that we have a large enough buffer for the given size </s>
|
funcom_train/42442470 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setPlayer( String player ){
boolean result = false;
if( currentPlayer.contentEquals("") ){
currentPlayer = player;
result = true;
} else if( otherPlayer.contentEquals("") ){
otherPlayer = player;
result = true;
if( ( gameID.contentEquals("") == false ) && ( gameRegistered == true ) ){
gameOn = true;
}
}
return result;
}
COM: <s> set the players names ids </s>
|
funcom_train/7618753 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPhone(String data, String type, String label){
if(phoneList == null)
phoneList = new ArrayList<PhoneData>();
PhoneData st = new PhoneData();
st.data = data;
st.type = type;
st.label = label;
phoneList.add(st);
}
COM: <s> add a phone info to phone list </s>
|
funcom_train/43098667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection getOutgoingStates(Object ostatevertex) {
if (ostatevertex instanceof MStateVertex) {
MStateVertex statevertex = (MStateVertex) ostatevertex;
Collection col = new ArrayList();
Iterator it = statevertex.getOutgoings().iterator();
while (it.hasNext()) {
col.add(((MTransition) it.next()).getTarget());
}
return col;
}
return null;
}
COM: <s> gets all statevertices that are a target to transitions </s>
|
funcom_train/205617 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMode(int mode) {
switch (mode) {
case NO_REFERENCES:
setMarshallingStrategy(new TreeMarshallingStrategy());
break;
case ID_REFERENCES:
setMarshallingStrategy(new ReferenceByIdMarshallingStrategy());
break;
case XPATH_REFERENCES:
setMarshallingStrategy(new ReferenceByXPathMarshallingStrategy());
break;
default:
throw new IllegalArgumentException("Unknown mode : " + mode);
}
}
COM: <s> change mode for dealing with duplicate references </s>
|
funcom_train/40639994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addExpressionPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_FeatureExpression_expression_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_FeatureExpression_expression_feature", "_UI_FeatureExpression_type"),
ConfigurationPackage.Literals.FEATURE_EXPRESSION__EXPRESSION,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the expression feature </s>
|
funcom_train/4025550 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getLastFragmentWithQualifier(String qualifier) {
ListIterator<IdentifierFragment> fragmentsIterator = fragments.listIterator( fragments.size() );
IdentifierFragment fragment;
while( fragmentsIterator.hasPrevious() ) {
fragment = fragmentsIterator.previous();
if(fragment.getQualifier().equals(qualifier)) {
return fragment.getFragment();
}
}
return null;
}
COM: <s> returns the last fragment matching the given i qualifier i </s>
|
funcom_train/10681079 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getThreadGroupName(long groupID) {
// Create new command packet
CommandPacket commandPacket = new CommandPacket(
JDWPCommands.ThreadGroupReferenceCommandSet.CommandSetID,
JDWPCommands.ThreadGroupReferenceCommandSet.NameCommand);
commandPacket.setNextValueAsReferenceTypeID(groupID);
ReplyPacket replyPacket = checkReply(performCommand(commandPacket));
return replyPacket.getNextValueAsString();
}
COM: <s> returns name of thread group for specified code group id code </s>
|
funcom_train/34811470 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean intersectRegions(){
boolean someIntersections = false;
for (int i=0; i< regionsOne.length; i++){
for (int j=0; j< regionsTwo.length; j++){
if (regionsOne[i].overlap(regionsTwo[j], maxGap)){
regionsOne[i].getIntersectingRegions().add(regionsTwo[j]);
regionsTwo[j].getIntersectingRegions().add(regionsOne[i]);
someIntersections = true;
}
}
}
return someIntersections;
}
COM: <s> loads regions with references to intersection partners </s>
|
funcom_train/18345251 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBreakpoints( int dim, float[] newBreakpoints ) {
int length = newBreakpoints.length;
if ( breakpoints[dim].length != length )
throw new ArrayIndexOutOfBoundsException( "Wrong number of breakpoints in new array." );
System.arraycopy( newBreakpoints, 0, breakpoints[dim], 0, length );
}
COM: <s> sets the array of breakpoints corresponding to the </s>
|
funcom_train/624635 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPrepend() {
LinkedList list = new LinkedList();
LinkedList list2 = new LinkedList();
list.add(new StringInstance("b"));
list2.add(new StringInstance("a"));
list2.add(new StringInstance("b"));
OclSequence seq = new SequenceInstance(Type.AString, list);
OclSequence seq2 = new SequenceInstance(Type.AString, list2);
OclSequence result = seq.prepend(new StringInstance("a"));
assertTrue(result.equals(seq2));
}
COM: <s> tests the ocl mod operation on sequences </s>
|
funcom_train/12079207 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int readTag() throws IOException {
if (isAtEnd()) {
lastTag = 0;
return 0;
}
lastTag = readRawVarint32();
if (WireFormat.getTagFieldNumber(lastTag) == 0) {
// If we actually read zero (or any tag number corresponding to field
// number zero), that's not a valid tag.
throw new IOException();
}
return lastTag;
}
COM: <s> attempt to read a field tag returning zero if we have reached eof </s>
|
funcom_train/37589950 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void chooseFont() {
String oldText = _fontField.getText();
Font f = FontChooser.showDialog(_parent, "Choose '" + getLabelText() + "'", _font);
if (f != null) {
_font = f;
_updateField(_font);
if (!oldText.equals(_fontField.getText())) { notifyChangeListeners(); }
}
}
COM: <s> shows a custom font chooser dialog to pick a new font </s>
|
funcom_train/44554604 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getSettings() {
Collection groups = getFlatSettingsGroups();
Vector settings = new Vector(0);
for (Iterator iter = groups.iterator(); iter.hasNext(); ) {
SettingsGroup settingsGroup = (SettingsGroup) iter.next();
settings.addAll(settingsGroup.getSettings().values());
}
return settings;
}
COM: <s> retrieves all the settings </s>
|
funcom_train/21656126 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtRegistrarCordenadas() {
if (btRegistrarCordenadas == null) {
btRegistrarCordenadas = new JButton();
btRegistrarCordenadas.setBounds(new Rectangle(20, 555, 100, 30));
btRegistrarCordenadas.setMnemonic('r');
btRegistrarCordenadas.setText("Registrar");
btRegistrarCordenadas.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
guardarCoordenadas();
ControladorPrincipal.mostrarMenuEditarProyecto();
}
});
}
return btRegistrarCordenadas;
}
COM: <s> this method initializes bt registrar cordenadas </s>
|
funcom_train/32968358 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testReset() {
System.out.println("reset");
LLEvent instance = new LLEvent();
instance.setMsgID(123L);
instance.setMsgClass(0);
instance.reset();
assertEquals(-1, instance.getMsgID());
assertEquals(-1, instance.getMsgClass());
}
COM: <s> test of reset method of class org </s>
|
funcom_train/12651932 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAttribute(CharacteristicCode characteristicCode, CharacteristicCode attributeCode) {
if ((characteristicCode == null) || (attributeCode == null))
throw new IllegalArgumentException("characteristic or attribute not specified");
Set<CharacteristicCode> set = attributeCharacteristics.get(characteristicCode);
if (set == null) {
set = new HashSet<CharacteristicCode>();
attributeCharacteristics.put(characteristicCode, set);
}
set.add(attributeCode);
}
COM: <s> adds an attribute to a characteristic </s>
|
funcom_train/11731901 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute(MultiIndex index) throws IOException {
PersistentIndex idx = index.getOrCreateIndex(indexName);
if (!index.indexNames.contains(indexName)) {
index.indexNames.addName(indexName, idx.getCurrentGeneration());
// now that the index is in the active list let the merger know about it
index.merger.indexAdded(indexName, idx.getNumDocuments());
}
}
COM: <s> adds a sub index to code index code </s>
|
funcom_train/17934763 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addText3D(Text3D[] text3D) {
if (this.text3D == null) this.text3D = new ArrayList();
for (int i = 0; i < text3D.length; i++) {
if (text3D[i] != null) {
text3D[i].x -= xCenter;
text3D[i].y -= yCenter;
text3D[i].z -= zCenter;
this.text3D.add(text3D[i]);
}
}
}
COM: <s> adds an array of text to the 3 d scene </s>
|
funcom_train/37189687 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean columnValid(DMTableModel tableModel, int row, Algorithms algorithms) {
String column = "The Column", isNotValid = " is not valid";
if(algorithms != null) {
final Resources resources = algorithms.getResources();
column = resources.COLUMN_NAME_STRING;
isNotValid = resources.IS_NOT_VALID_STRING;
}
message.setText(column+" "+column+" "+isNotValid+"!");
return false;
}
COM: <s> the method places the message column x is not valid </s>
|
funcom_train/2302260 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean canModifyChild(MinimizeTreeNode parent) {
if (expanding == parent && parent != null) return true;
if (parent == null) {
JOptionPane.showMessageDialog
(view, "The root cannot be changed!");
return false;
}
JOptionPane.showMessageDialog
(view, "We cannot modify the partitions of a"+
"\ngroup we're not expanding!"+
(expanding == null ? "" :
"\nWe are expanding group "
+minimizer.getString(expanding.getStates())));
return false;
}
COM: <s> this should be called if were seeking to modify the partitions </s>
|
funcom_train/23714259 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PartSpec findRoleSpec(String roleType, Vector roleSpecs) {
for (int i = 0; i < roleSpecs.size(); i++) {
PartSpec parttemp = (PartSpec) roleSpecs.elementAt(i);
String tmp = parttemp.getRoleType();
if (roleType.equals(tmp)) {
return parttemp;
}
}
return null;
}
COM: <s> search the part specs table for a specific part </s>
|
funcom_train/40620126 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void workaroundIssue1813(Element element) {
DOM.setStyleAttribute(element, "position", "relative");
DOM.setStyleAttribute(element, "overflow", "hidden");
// Needed for TD element in non-IE browsers
DOM.setStyleAttribute(element, "display", "block");
}
COM: <s> todo remove once issue 1813 has been resolved </s>
|
funcom_train/13271513 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setObserverCameraElevationAdjusted(boolean observerCameraElevationAdjusted) {
if (this.observerCameraElevationAdjusted != observerCameraElevationAdjusted) {
this.observerCameraElevationAdjusted = observerCameraElevationAdjusted;
this.propertyChangeSupport.firePropertyChange(Property.OBSERVER_CAMERA_ELEVATION_ADJUSTED.name(),
!observerCameraElevationAdjusted, observerCameraElevationAdjusted);
}
}
COM: <s> sets whether the observer elevation should be adjusted according </s>
|
funcom_train/36753946 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPixelRGB(double inR, double inG, double inB, int inX, int inY) {
int idx = calcIdx(inX, inY);
data[idx + 0] = (float) inR;
data[idx + 1] = (float) inG;
data[idx + 2] = (float) inB;
}
COM: <s> set the color of a pixel using rgb data </s>
|
funcom_train/23168553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ClassField findField(String fieldName) {
for (Enumeration e = fields().elements(); e.hasMoreElements();) {
ClassField field = (ClassField) e.nextElement();
if (field.name().asString().equals(fieldName))
return field;
}
return null;
}
COM: <s> look for a field with the specified name </s>
|
funcom_train/46714000 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer sb = new StringBuffer(super.toString());
sb.append(" - {name: ").append(getName() );
sb.append(" uri: " ).append(getSourceURI());
sb.append('}' );
return sb.toString();
}
COM: <s> returns a string representation of this object </s>
|
funcom_train/26133427 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void advance() {
if (theParent == null)
throw new InvalidIteratorOperationException() ;
theParent = theItem ;
if (theItem != null) {
// If there are duplicates then they are to be found in the
// left child. See add.
theItem = theItem.left ;
isLeft = true ;
search(theValue) ;
}
}
COM: <s> move the iterator on one </s>
|
funcom_train/9879104 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getAssessmentSelection(){
//if validation is not selected return A3 indicating only initial classification
if(!this.validationCheckBox.isSelected())
return DAMGUI.A3;
if(this.A2button.isSelected())
return DAMGUI.A2;
else if(this.A1button.isSelected())
return DAMGUI.A1;
else if (this.A0button.isSelected())
return DAMGUI.A0;
else
return DAMGUI.A3;
}
COM: <s> returns a constant indicating which svm process to run </s>
|
funcom_train/2897956 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void releaseConnection(Connection conn) {
int thisconn = idOfConnection(conn);
if (thisconn >= 0) {
connStatus[thisconn] = 0;
//log.println("Freed connection " + String.valueOf(thisconn) +
// " normal exit: ");
} else {
if (debugLevel > 0) {
log.println("----> Error: Could not free connection!!!");
}
}
}
COM: <s> frees a connection </s>
|
funcom_train/16511224 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initHelp() {
try {
ClassLoader cl = LicenseMain.class.getClassLoader();
URL url = HelpSet.findHelpSet(cl, "documentation/OSLC.hs");
JHelp helpViewer = new JHelp(new HelpSet(cl, url));
helpFrame.getContentPane().add(helpViewer);
} catch (Exception e) {
ErrorManager.error("HelpSet not found", e);
}
}
COM: <s> initialize application help </s>
|
funcom_train/20461343 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Statement methodBlock(FrameworkMethod method) {
Object test;
try {
test= new ReflectiveCallable() {
@Override
protected Object runReflectiveCall() throws Throwable {
return createTest();
}
}.run();
} catch (Throwable e) {
return new Fail(e);
}
Statement statement= methodInvoker(method, test);
statement= possiblyExpectingExceptions(method, test, statement);
statement= withPotentialTimeout(method, test, statement);
statement= withBefores(method, test, statement);
statement= withAfters(method, test, statement);
statement= withRules(method, test, statement);
return statement;
}
COM: <s> returns a statement that when executed either returns normally if </s>
|
funcom_train/1548814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void percolateUpMaxHeap(final int index) {
int hole = index;
E element = elements[hole];
while (hole > 1 && compare(element, elements[hole / 2]) > 0) {
// save element that is being pushed down
// as the element "bubble" is percolated up
final int next = hole / 2;
elements[hole] = elements[next];
hole = next;
}
elements[hole] = element;
}
COM: <s> percolates element up heap from from the position given by the index </s>
|
funcom_train/7725349 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void quit() {
// This method should be modified!
if(JOptionPane.showConfirmDialog(this, "Are you sure you want to quit?", "Really quit?",
JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {
try {
player.getOpponent().quitGame();
player.setOpponent(null);
} catch (RemoteException ex) {
ex.printStackTrace();
}
System.exit(0);
}
}
COM: <s> exits the game if the user confirms it in a dialog box </s>
|
funcom_train/25796054 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Cursor fetchAllAuthors() {
SQLiteDatabase mDb = mDbHelper.getReadableDatabase();
Cursor c = mDb.query(DATABASE_TABLE,
new String[] {KEY_ROWID, KEY_AUTHORID, KEY_AUTHORNAME},
null, null, null, null, null);
return c;
}
COM: <s> return a cursor over the list of all authors </s>
|
funcom_train/21884017 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getVendor(final String type, final String name) {
final StringBuffer sb = new StringBuffer();
sb.append("package.").append(type + ".").append(name + ".").append(Constants.PROPERTY_PKG_VENDOR_FIELD);
return getProject().getProperty(sb.toString());
}
COM: <s> returns the package vendor </s>
|
funcom_train/45450346 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ActionForward findForwardError(final ActionMapping mapping, final HttpServletRequest request) {
ActionErrors errorMessages = new ActionErrors();
errorMessages.add(ActionErrors.GLOBAL_MESSAGE, new ActionError("GLOBAL.error"));
saveMessages(request, SKIN_ERROR_MESSAGES, errorMessages);
return mapping.findForward("error");
}
COM: <s> saves global error message on the request at the skin error messages attribute </s>
|
funcom_train/45499052 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton() {
if (jButton == null) {
jButton = new JButton();
jButton.setBounds(new Rectangle(15, 370, 100, 25));
jButton.setText("Demo 1");
jButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
// TODO Auto-generated Event stub actionPerformed()
RunDemo(1);
}
});
}
return jButton;
}
COM: <s> this method initializes j button </s>
|
funcom_train/31940584 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void startup(String[] args) {
// Set the ini file to use
/*
String iniFile = "res/Init.properties";
if (args.length > 0) {
iniFile = args[0];
}
initProperties(iniFile);
*/
initProperties();
initPrefs();
initProxySettings();
initLogging();
initEventManager();
initController();
initLanguageManager();
initImages();
initActions();
initUI();
// Create and show the MainFrame
MainFramePro mainFrame = new MainFramePro();
AppContext.getInstance().setMainFrame(mainFrame);
mainFrame.setVisible(true);
}
COM: <s> creates and shows the main frame </s>
|
funcom_train/35019153 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addListeners(Session session) {
BreakpointManager bm = BreakpointProvider.getBreakpointManager(session);
bm.addBreakpointListener(this);
Iterator<Breakpoint> biter = bm.getDefaultGroup().breakpoints(true);
while (biter.hasNext()) {
Breakpoint bp = biter.next();
bp.addPropertyChangeListener(this);
}
}
COM: <s> register as a listener with certain components </s>
|
funcom_train/12636037 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean keyInput(int type, int keyCode) {
CLayer layer;
synchronized (layers) {
for (CLayerElement le = layers.getTop();
le != null; le = le.getLower()) {
layer = le.getLayer();
if (layer.supportsInput &&
layer.keyInput(type, keyCode))
{
return true;
}
}
} // sync
return false;
}
COM: <s> allow this window to process key input </s>
|
funcom_train/34141040 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInputValue() throws Exception {
parse("<input type=\"button\" value=\"Search\"/>");
assertEquals("Search Button", mHandler.getOutput());
parse("<textarea value=\"Content here\"/>");
assertEquals("Content here Text area", mHandler.getOutput());
}
COM: <s> for most input types the value of the element should be spoken </s>
|
funcom_train/24134952 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void forceLayout() {
if (_initialized-- > 0) {
setSize(getSize().width+1,getSize().height+1);
setSize(getSize().width+1,getSize().height+1);
setVisible(true);
}
}
COM: <s> kludge to force a layout </s>
|
funcom_train/17136138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dropInventoryItem(Item item, double x, double y) {
for (int i = this.getInventory().size() - 1; i >= 0; i--) {
if (this.getInventory().get(i) == item) {
this.dropInventoryItem(i, x, y);
}
}
}
COM: <s> removes the an item from the inventory </s>
|
funcom_train/32746432 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean action(Event evt, Object arg) {
if(evt.target instanceof Checkbox) {
if(totalCb_.getState()) place_ = Match.ALL;
if(homeCb_.getState()) place_ = Match.HOME;
if(awayCb_.getState()) place_ = Match.AWAY;
// rebuild and repaint the stats
dirty_ = true;
repaint();
return true;
}
return false;
}
COM: <s> handles clicking in radio btns </s>
|
funcom_train/10677188 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HashMap setPlugins(HashMap value) {
if (value == null) {
throw new NullPointerException(MessageInfo.MSG_PREFIX
+ "Unexpected null value for arrays of plugin's parameters");
}
synchronized (allPlugins) {
HashMap tmpStore = allPlugins;
allPlugins = (HashMap)value.clone();
return tmpStore;
}
}
COM: <s> set the map of properties for all plugins </s>
|
funcom_train/2927600 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void evaluate(Object node, MappingContext context, List result) {
List targetList = context.getExtension(this.extensionName).get(
this.indexProperty,
this.byValue ? context.getDXM().getNodeValue(node) : node);
if (targetList != null) {
for (Iterator j = targetList.iterator(); j.hasNext();) {
this.filter.filter((MappingContext.ExtensionValue) j.next(),
context, result);
}
}
}
COM: <s> look up and filter the </s>
|
funcom_train/37446378 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getProperty (String propName) {
String value = null;
if (properties != null) {
value = properties.getProperty(propName);
} else {
logger.warn ("Could not load property " + propName + ", " + Constants.INTSEQ_PROPERTIES + " not loaded.");
}
return value;
}
COM: <s> returns a value stored in a properties file </s>
|
funcom_train/29031961 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean creepStartsSound(IConstants.Creeps t) {
if (usedThreadCreepStartsS.getState() != Thread.State.TERMINATED
|| mute) {
return false;
}
switch (t) {
case creep1:
Thread creeps1 = new Thread(new Sound(this.clipWARN));
usedThreadCreepStartsS = creeps1;
creeps1.start();
break;
default:
Thread creepsDef = new Thread(new Sound(this.clipWARN));
usedThreadCreepStartsS = creepsDef;
creepsDef.start();
break;
}
return true;
}
COM: <s> use this for a creep that is just born </s>
|
funcom_train/17540558 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void feedByteBuffer(ByteBuffer buffer) throws CommsException {
CharBuffer cbuffer;
try {
cbuffer = wireDecoder.decode(buffer);
} catch (CharacterCodingException ex) {
throw new CommsException("Failed to decode KATCP data to string.", ex);
}
chunk = handleChunk(chunk + cbuffer.toString());
}
COM: <s> process a byte buffer adding any messages to the internal message queue </s>
|
funcom_train/5722157 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkCourseEndDate(final CourseBean course) {
Validate.notNull(course.getStartDate(), "Parameter course must contain a valid start date.");
if (course.getEndDate() == null || course.getStartDate().before(course.getEndDate())) {
course.setEndDate(course.getStartDate());
}
}
COM: <s> check if the course enddate is not null and after startdate </s>
|
funcom_train/12305293 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateAttribute (String dn, MDSResult at) throws MDSException {
try {
Attributes ats = convertAttributes(at);
ctx.modifyAttributes(dn, DirContext.REPLACE_ATTRIBUTE, ats);
} catch(NamingException e) {
throw new MDSException("Failed to update attributes for " + dn, e);
}
}
COM: <s> updates attributes of an entry </s>
|
funcom_train/10929063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeAcl(Acl acl, OutputStream out) throws JAXBException {
CmisAccessControlListType aclJaxb = convert(acl);
if (aclJaxb == null) {
return;
}
JaxBHelper.marshal(JaxBHelper.CMIS_OBJECT_FACTORY.createAcl(aclJaxb), out, false);
}
COM: <s> writes an object </s>
|
funcom_train/50862341 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void requestTreatment(HealthProblem problem) {
medicalStation.requestTreatment(problem);
// Add person to building if possible.
if (getBuilding().hasFunction(LifeSupport.NAME)) {
LifeSupport lifeSupport = (LifeSupport) getBuilding().getFunction(LifeSupport.NAME);
if (!lifeSupport.containsPerson(problem.getSufferer())) {
lifeSupport.addPerson(problem.getSufferer());
}
}
}
COM: <s> add a health problem to the queue of problems awaiting treatment at this </s>
|
funcom_train/21160709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getMFoamWeightEdit() {
if (mFoamWeightEdit == null) {
mFoamWeightEdit = new JTextField();
mFoamWeightEdit.setBounds(new Rectangle(345, 75, 76, 20));
mFoamWeightEdit.setToolTipText(LanguageResource.getString("WeightCalculatorDialog.24")); //$NON-NLS-1$
mFoamWeightEdit.setEditable(false);
}
return mFoamWeightEdit;
}
COM: <s> this method initializes m foam weight edit </s>
|
funcom_train/29832024 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValuesFrom(Configuration otherConfiguration) {
if (otherConfiguration == null) {
throw new IllegalArgumentException("otherConfiguration must not be null");
} else if (!this.configuredClass.equals(this.configuredClass)) {
throw new IllegalArgumentException("other configuration must be for same class");
}
for (Field field : otherConfiguration.valueMap.keySet()) {
Object value = otherConfiguration.valueMap.get(field);
if (value != null) {
this.setValue(field, value);
}
}
}
COM: <s> adds all values set in another configuration to this configuration </s>
|
funcom_train/29722214 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getOK() {
if (OK == null) {
OK = new JButton();
OK.setPreferredSize(new Dimension(80, 20));
OK.setHorizontalAlignment(SwingConstants.CENTER);
OK.setText(Bundle.getText("rolesDialog.ok"));
OK.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
choice = RolesDialog.CHOIX_OK;
RolesDialog.this.setVisible(false);
}
});
}
return OK;
}
COM: <s> this method initializes ok </s>
|
funcom_train/7519917 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startBench(String s) {
//System.out.println("start bench start " + s);
Measure m = (Measure) hash.get(s);
if (m == null) {
m = new Measure();
m.numRuns = 0;
m.totalTime = 0;
m.name = s;
m.sTime = timeProvider.currentTimeMillis();
hash.put(s, m);
} else {
m.sTime = timeProvider.currentTimeMillis();
}
//System.out.println("start bench end " + s);
}
COM: <s> starts a measure </s>
|
funcom_train/27682897 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: synchronized public void logString(String logString, int loggingLevel) {
// Log the message if higher or equal to current logging level,
if (isLoggingEnabledFor(loggingLevel)) {
AbstractLoggingMechanism currentLoggingMechanism = null;
// Run through the loggingMechanisms vector and close the mechanisms
for (Enumeration e = loggingMechanisms.elements();
e.hasMoreElements(); ) {
currentLoggingMechanism = (AbstractLoggingMechanism)
e.nextElement();
currentLoggingMechanism.logString(this, loggingLevel, logString);
}
}
}
COM: <s> adds a message string to the log if the logs level is </s>
|
funcom_train/38734946 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getNumFilteredItems(int itemType) {
Map<String, ? extends FilteredItem> m = null;
switch (itemType) {
case FiltrableItems.NNSS:
m = nnss;
break;
case FiltrableItems.LANG:
m = languages;
break;
case FiltrableItems.ACTION:
m = actions;
break;
case FiltrableItems.METHOD:
m = methods;
}
return m.size();
}
COM: <s> returns the number of urls correspondig to a given type of information </s>
|
funcom_train/50338718 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void init() {
//setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
setLayout(new BorderLayout());
JPanel pane2a = layoutRosterSelection();
if (pane2a != null) add(pane2a, BorderLayout.NORTH);
add(layoutDecoderSelection(), BorderLayout.CENTER);
add(createProgrammerSelection(), BorderLayout.SOUTH);
setBorder(new EmptyBorder(6,6,6,6));
}
COM: <s> initialize the gui </s>
|
funcom_train/28688103 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void stosw() throws MemoryException {
RealModeAddress address =
new RealModeAddress(m_state.getES(), m_state.getDI());
m_memory.writeWord(address, m_state.getAX());
byte diff = (m_state.getDirectionFlag() ? (byte)-2 : (byte)2);
m_state.setDI((short)(m_state.getDI() + diff));
}
COM: <s> implements the stosw opcode </s>
|
funcom_train/9508455 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int compareValues(float[] lhs, float[] rhs) {
int changeLevel = Detector.DETECTOR_CHANGELEVEL_TINY;
for (int i = 0; i < lhs.length; i++) {
int newChangeLevel = digitToChangeLevel(lhs[i] - rhs[i]);
Log.d("oriDetect", "Axis " + i + "change value: "
+ (lhs[i] - rhs[i]));
if (changeLevel < newChangeLevel) {
changeLevel = newChangeLevel;
}
}
return changeLevel;
}
COM: <s> compares two float arrays item by item and calculates the biggest change </s>
|
funcom_train/25638054 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void buildConstructorsSummary(XMLNode node, Content memberSummaryTree) {
MemberSummaryWriter writer =
memberSummaryWriters[VisibleMemberMap.CONSTRUCTORS];
VisibleMemberMap visibleMemberMap =
visibleMemberMaps[VisibleMemberMap.CONSTRUCTORS];
addSummary(writer, visibleMemberMap, false, memberSummaryTree);
}
COM: <s> build the constructor summary </s>
|
funcom_train/9266655 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean decreasePriority() {
boolean intStatus = Machine.interrupt().disable();
LotteryState state = getThreadState(KThread.currentThread());
// Can't decrease if we're at min priority.
if(state.getPriority() == priorityMinimum){
Machine.interrupt().restore(intStatus);
return false;
}
state.setPriority(state.getPriority() - 1);
Machine.interrupt().restore(intStatus);
return true;
}
COM: <s> decreases a processs ticket count by 1 </s>
|
funcom_train/47281775 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAllRowValues(Object val, int columnIndex) {
for (int i = 0; i < getRowCount(); i++) {
Object oldVal = getValueAt(i, columnIndex);
if (!val.equals(oldVal)) {
setValueAt(val, i, columnIndex);
}
}
}
COM: <s> sets all the values of the given column to the given value </s>
|
funcom_train/42068135 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSamplePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_SampleData8Bit_sample_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_SampleData8Bit_sample_feature", "_UI_SampleData8Bit_type"),
WavPackage.Literals.SAMPLE_DATA8_BIT__SAMPLE,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the sample feature </s>
|
funcom_train/46330373 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void crossover(Population population) {
Random r = new Random();
double crossRate = 1.0;
List<Chromosome> individuals = population.getIndividuals();
for (int i = 0; i < individuals.size() / 2; i++) {
Chromosome individual1 = individuals.get(2 * i);
Chromosome individual2 = individuals.get(2 * i + 1);
double prob = r.nextDouble();
if (prob < crossRate)
cross(individual1, individual2);
}
}
COM: <s> this method do the crossover operation on a population </s>
|
funcom_train/49026952 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComboBox getJComboBox1() {
if (jComboBox1 == null) {
Set<String> sostanze = new TreeSet<String>();
for (Sostanza s : Sostanza.values())
sostanze.add(s.toString().replace("_", " "));
sostanze.add("Seleziona sostanza..");
jComboBox1 = new JComboBox(sostanze.toArray());
jComboBox1.setFont(new Font("Dialog", Font.PLAIN, 12));
}
return jComboBox1;
}
COM: <s> this method initializes j combo box1 </s>
|
funcom_train/12155755 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDicomPatientId(String dicomPatientId) {
if (logger.isDebugEnabled()) {
logger.debug("Entering setDicomPatientId(String dicomPatientId).");
logger.debug("dicomPatientId = " + (dicomPatientId != null ? "\"" + dicomPatientId + "\"" : null) + ".");
}
this.dicomPatientId = dicomPatientId;
logger.debug("Exiting setDicomPatientId(String dicomPatientId");
}
COM: <s> sets the dicom patient id </s>
|
funcom_train/44018174 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void EnableSelectedDimField(final JRadioButton selectedButton) {
OriginalDimsButton.setSelected(selectedButton == OriginalDimsButton);
MultiplierDimsButton
.setSelected(selectedButton == MultiplierDimsButton);
MultiplierDimsText.setEnabled(selectedButton == MultiplierDimsButton);
CustomDimsButton.setSelected(selectedButton == CustomDimsButton);
CustomDimsTextX.setEnabled(selectedButton == CustomDimsButton);
CustomDimsTextY.setEnabled(selectedButton == CustomDimsButton);
}
COM: <s> update the ui elements for choosing mosaic output dimensions based on the </s>
|
funcom_train/42548473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Site getSite(int siteIndex) {
int i = 0;
for (Site site : sites) {
if (turnedOffSites.contains(site)) {
siteIndex++;
}
if (i == siteIndex) {
return site;
}
i++;
}
System.err.println("Can't find site for index " + siteIndex + ". sites.size()==" + sites.size());
return null;
}
COM: <s> returns a column key </s>
|
funcom_train/2860962 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(String name, IniFile ini) {
String method = "AccessConnectInfo.init()";
Log.out.println(Log.TRACE_ENTERS_AND_EXITS, method, "Enter method.");
this.serverName = name;
this.loadini(ini);
Log.out.println(Log.TRACE_ENTERS_AND_EXITS, method, "Exit method.");
}
COM: <s> initialzes the access server by name using the configuration information </s>
|
funcom_train/34538059 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addFromParameter(String _parameter, String _fieldName, String _realName) {
if (this.paramFrom == null) this.paramFrom = new Vector<QueryParameterStructure>();
QueryParameterStructure aux = new QueryParameterStructure(_parameter, _fieldName, "FROM", _realName);
this.paramFrom.addElement(aux);
}
COM: <s> adds new parameter to the from clause </s>
|
funcom_train/17892549 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void itemStateChanged(final ItemEvent evt) {
boolean show;
if (evt.getStateChange() == ItemEvent.SELECTED) {
show = true;
} else {
show = false;
}
// Update all objects that share this item
setSelected(show);
manager.forwardItemEvent(new ItemEvent(evt.getItemSelectable(), ItemEvent.ITEM_STATE_CHANGED, this, evt.getStateChange()));
}
COM: <s> show or hide the statistics </s>
|
funcom_train/42097635 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int iterativeMTDf() {
int guess = 0;
int finalMaxDepth = maxSearchDepth;
//repeat for 2, 4, 6, 8, etc depth
//transposition table will retain some results
for (maxSearchDepth = (finalMaxDepth & 1);
maxSearchDepth <= finalMaxDepth;
maxSearchDepth += 2) {
//System.out.println("Searching at..." + maxSearchDepth);
guess = searchMTDf(guess);
}
maxSearchDepth = finalMaxDepth;
return guess;
}
COM: <s> mtd f in an iterative framework </s>
|
funcom_train/44556409 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getPixelValue(int x, int y) {
if (x>=0 && x<width && y>=0 && y<height) {
int c = pixels[y*width+x];
int r = (c&0xff0000)>>16;
int g = (c&0xff00)>>8;
int b = c&0xff;
return (float)(r*ColorProcessor.rWeight + g*ColorProcessor.gWeight + b*ColorProcessor.bWeight);
}
else
return 0;
}
COM: <s> converts the specified pixel to grayscale using the </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.