__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/43321951 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean await(final SubMonitor progress) {
try {
while (!acknowledged.get() && !progress.isCanceled())
Thread.sleep(stopManager.MILLISTOWAIT);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
log.error("Code not designed to be interruptable", e);
}
if (progress.isCanceled())
throw new CancellationException();
return acknowledged.get();
}
COM: <s> waits until the start handle is acknowledged or the waiting is canceled </s>
|
funcom_train/25033411 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getWidth(int frame,int transform) {
final SingleVOITransforms useTransform = getTransformsForFrame(frame);
final SingleVOITransform singleTransform = (SingleVOITransform)(useTransform.get(transform));
//System.err.println("VOITransform.getWidth(): from frame "+frame+" has singleTransform="+singleTransform);
return singleTransform == null ? 0 : (singleTransform instanceof VOIWindowTransform ? ((VOIWindowTransform)singleTransform).width : 0);
}
COM: <s> get the window width of the particular transform available for a particular frame </s>
|
funcom_train/26335388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDescription() {
if( this.hp <= this.maxHp/10 )
return " (near death)";
if( this.hp <= this.maxHp/5 )
return " (badly wounded)";
if( this.hp <= this.maxHp/2 )
return " (injured)";
return "";
}
COM: <s> get a description when looked at </s>
|
funcom_train/39004640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean checkIfItemTypeHasUrl(ItemType itemType) {
//TODO normally the right way to do
// if (itemType.getContentFile() == null)
// return true;
if (itemType.getIdentifierRef().startsWith("http")
|| itemType.getIdentifierRef().startsWith("www")
|| itemType.getIdentifierRef().startsWith("ftp://"))
return true;
else return false;
}
COM: <s> checks if item type is url or file </s>
|
funcom_train/24013186 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execJava(List<String> command) throws IOException {
final String fileSep = System.getProperty("file.separator");
List<String> cmd = new ArrayList<String>(command.size() + 3);
cmd.add(System.getProperty("java.home") + fileSep + "bin" + fileSep + "java");
cmd.add("-cp");
cmd.add(System.getProperty("java.class.path"));
cmd.addAll(command);
exec(cmd);
}
COM: <s> start a java program as native process </s>
|
funcom_train/17673739 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void firePostStore(Object o) {
if (postStoreList == null) {
return;
}
LifecycleEvent ev = new LifecycleEvent(o, LifecycleEvent.POSTSTORE);
for (PostStoreNode i = postStoreList; i != null; i = i.next) {
i.listener.postStore(ev);
}
}
COM: <s> fire a post store event </s>
|
funcom_train/2676419 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void firePipeConnectionEvent(PipeConnectionEvent event) {
for (IPipeConnectionListener element : listeners) {
try {
element.onPipeConnectionEvent(event);
} catch (Throwable t) {
log.error("exception when handling pipe connection event", t);
}
}
// Run all of event's tasks
for (Runnable task : event.getTaskList()) {
try {
task.run();
} catch (Throwable t) {
}
}
// Clear event's tasks list
event.getTaskList().clear();
}
COM: <s> fire any pipe connection event and run all its tasks </s>
|
funcom_train/44712121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Mapping getMapping() {
String path[] = {getProperty().getName()};
Mapping mapping = new Mapping(path,
getColumn().getTable().getAlias(),
getAlias());
mapping.setLineInfo(getProperty());
return mapping;
}
COM: <s> this returns the standard mapping with a slight twist </s>
|
funcom_train/12188880 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEmptySequence() throws ExpressionException {
final Function function = new SumFunction();
Value result = function.invoke(expressionContextMock,
new Value[]{factory.createSequence(new Item[]{})});
assertTrue(result instanceof IntValue);
assertEquals(0, ((IntValue) result).asJavaInt());
}
COM: <s> tests if for empty sequence sum is 0 </s>
|
funcom_train/45623402 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addConfigFilePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_GenerateApplicationManifestType_configFile_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_GenerateApplicationManifestType_configFile_feature", "_UI_GenerateApplicationManifestType_type"),
MSBPackage.eINSTANCE.getGenerateApplicationManifestType_ConfigFile(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the config file feature </s>
|
funcom_train/10750194 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetPriority_CheckAccess() {
sm = System.getSecurityManager();
System.setSecurityManager(new ReversibleSecurityManager());
Thread t = new Thread();
int p = t.getPriority();
t.setPriority(p);
int newP = t.getPriority();
System.setSecurityManager(sm);
assertEquals(p, newP);
}
COM: <s> verify the set priority method when a security manager is set </s>
|
funcom_train/10258776 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void syncEnd(SyncEvent syncEvent) {
if (Logger.isLoggable(Logger.INFO)) {
Logger.info(syncEvent.getDate() + ", " +
Language.getMessage(Language.LOG_SYNC_END)
);
}
setStatusMessage(Language.getMessage(Language.STATUS_SYNC_END));
}
COM: <s> fired when the synchronization process end </s>
|
funcom_train/14070156 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBasic() {
TaskProperties props = new TaskProperties();
props.put("foo","bar");
assertNotNull("Didn't retrieve property",props.get("foo"));
assertEquals("Not the right value!","bar",props.get("foo"));
}
COM: <s> just a simple test to see if this actually works or not </s>
|
funcom_train/32982681 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JScreenComponent getComponentByName(String name, int start) {
JScreenComponent sc = null;
Component all[] = this.getComponents();
String targ = null;
for (int i = 0; i < all.length; i++) {
sc = (JScreenComponent) all[i];
targ = sc.getComponentName();
if (i >= start && targ != null && targ.equals(name))
break;
else
sc = null;
}
return sc;
}
COM: <s> get a sceen element by its name </s>
|
funcom_train/13965242 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public WOComponent selectAction() {
EOEnterpriseObject selected = (objectToAddToRelationship() != null) ? EOUtilities.localInstanceOfObject(masterObject().editingContext(), objectToAddToRelationship()) : null;
if (selected != null) {
masterObject().addObjectToBothSidesOfRelationshipWithKey(selected, relationshipKey());
relationshipDisplayGroup().fetch();
relationshipDisplayGroup().selectObject(selected);
relationshipDisplayGroup().displayBatchContainingSelectedObject();
}
return null;
}
COM: <s> perform the select action </s>
|
funcom_train/35947602 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Text toUpperCase() {
if (_data == null) // Composite.
return newComposite(_head.toUpperCase(), _tail.toUpperCase());
Text text = Text.newPrimitive(_count);
for (int i = 0; i < _count;) {
text._data[i] = Character.toUpperCase(_data[i++]);
}
return text;
}
COM: <s> converts the characters of this text to upper case </s>
|
funcom_train/32733634 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void init() {
currentClinic = origClinic;
this.setLastQueue(null);
beginCritCare = false;
activeCritCare = false;
endCritCare = false;
beginRegister = false;
endRegister = false;
bedOccupied = false;
normalBedOccupied = false;
labStarted = false;
labFinished = false;
imagingStarted = false;
imagingFinished = false;
}
COM: <s> initializes the ed patient attributes to values appropriate for </s>
|
funcom_train/44869422 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private WCMRiemannSumRectsBean getRs2() {
if (rs2 == null) {
rs2 = new WCMRiemannSumRectsBean();
rs2.setNegFillColor(Color.red);
rs2.setNegOutlineColor(Color.red);
rs2.setPosFillColor(Color.green);
rs2.setPosOutlineColor(Color.green);
rs2.setIntervalCount(new Constant(100));
rs2.setXMax(getGOfB());
rs2.setXMin(getGOfA());
rs2.setFunction(getFPrime());
}
return rs2;
}
COM: <s> this method initializes rs2 </s>
|
funcom_train/40928616 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getAceptarVerificacionCommand() {
if (aceptarVerificacionCommand == null) {//GEN-END:|266-getter|0|266-preInit
// write pre-init user code here
aceptarVerificacionCommand = new Command("Ok", Command.OK, 0);//GEN-LINE:|266-getter|1|266-postInit
// write post-init user code here
}//GEN-BEGIN:|266-getter|2|
return aceptarVerificacionCommand;
}
COM: <s> returns an initiliazed instance of aceptar verificacion command component </s>
|
funcom_train/23976113 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void makeLive()
{
fRoot.compile();
fUniverse.addBranchGraph(fRoot);
VisbardMain.getRangeModel().addListener(this);
VisbardMain.getDatasetContainer().addListener(this);
this.refreshTimeOverlay();
// This is needed as a workaround for the Java 1.5 bug that doesn't play
// nicely with the Canvas class
VisbardMain.getVisWindow().refreshCanvas();
sLogger.info("Universe initialized.");
}
COM: <s> start rendering the universe </s>
|
funcom_train/4927817 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int calculateTabWidth(int tabPlacement, int tabIndex, FontMetrics metrics) {
int width = super.calculateTabWidth(tabPlacement, tabIndex, metrics) + metrics.getHeight();
if (tabIndex == (rects.length - 1)) {
width += lastWidth;
}
return width;
}
COM: <s> calculates tab width </s>
|
funcom_train/1440710 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void notestGetLogLevels() {
System.out.println("getLogLevels");
String[] expResult = null;
String[] result = ServerLogsLevelProvider.getLogLevels();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get log levels method of class server logs level provider </s>
|
funcom_train/1961920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String nextUserID() throws Exception {
String uidcount$ = getProperty("UIDCOUNT");
int count = 0;
if (uidcount$ == null) {
uidcount$ = "0";
setProperty("UIDCOUNT", uidcount$);
count = Integer.parseInt(uidcount$);
} else {
count = Integer.parseInt(uidcount$);
setProperty("UIDCOUNT", "" + (count + 1));
}
DecimalFormat nf = new DecimalFormat();
nf.setGroupingSize(20);
nf.setMinimumIntegerDigits(6);
String uid = this.getDefaultUIDPrefix() + nf.format(count)
+ this.getDefaultUIDSuffix();
return uid;
}
COM: <s> fetch next user id update counter </s>
|
funcom_train/9879128 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void onSetBackgroundColor() {
Frame frame = JOptionPane.getFrameForComponent(getContentComponent());
Color newColor = JColorChooser.showDialog(frame, "Choose color", getBackground());
if (newColor != null) {
setBackground(newColor);
}
}
COM: <s> sets a background color </s>
|
funcom_train/3409280 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCertPathCheckers(List<PKIXCertPathChecker> checkers) {
if (checkers != null) {
List<PKIXCertPathChecker> tmpList =
new ArrayList<PKIXCertPathChecker>();
for (PKIXCertPathChecker checker : checkers) {
tmpList.add((PKIXCertPathChecker)checker.clone());
}
this.certPathCheckers = tmpList;
} else {
this.certPathCheckers = new ArrayList<PKIXCertPathChecker>();
}
}
COM: <s> sets a code list code of additional certification path checkers </s>
|
funcom_train/1570796 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void println(String[][] values) {
for (int i = 0; i < values.length; i++) {
println(values[i]);
}
if (values.length == 0) {
this.out.println();
}
this.out.flush();
this.newLine = true;
}
COM: <s> print several lines of comma separated values </s>
|
funcom_train/50217690 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doOpenJavaEditor() {
// doucle click on selected provider, open the Java Class Editor.
IProject project = getProject();
if (project == null)
return;
IProjectObjectInstanceProvider instanceProvider = getSelectedInstanceProvider();
if (instanceProvider == null)
return;
String className = instanceProvider.getClassName();
String methodName = instanceProvider.getMethodName();
FreemarkerJavaHelperUI.createClass(className, methodName, project,
null, false);
}
COM: <s> open the java editor with class method nom of the selected instance </s>
|
funcom_train/50500795 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void dirtyUffRange() {
FontRange r;
if ( ! m_controller.calculateUffRanges() ) {
showErrorPane( "Generating Uff ranges failed", false );
}
else {
// uff ranges changed
visualUffRanges();
// ...and his may change fonts BBox, too
visualUffBBox();
}
}
COM: <s> called from someboy how has made uff ranges dirty </s>
|
funcom_train/22234295 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean close() {
if (thread == null)
return false;
if (thread.close()) {
if (debugFlag)
debugPrintln("JavaSoundMixer: JSStream.close returned true");
return true;
}
else {
if (debugFlag)
debugPrintln("JavaSoundMixer: JSStream.close returned false");
return false;
}
}
COM: <s> code to close the device </s>
|
funcom_train/51102785 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void traverseQueries(Iterator queries, ProjectPath path) {
if (sort) {
queries = Util.sortedIterator(queries, ProjectTraversal.queryComparator);
}
while (queries.hasNext()) {
Query query = (Query) queries.next();
ProjectPath queryPath = path.appendToPath(query);
handler.projectNode(queryPath);
}
}
COM: <s> performs recursive traversal of an iterator of cayenne query objects </s>
|
funcom_train/21899553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SchemaClass getSchemaClass(String iEntityName, SchemaClass iBaseClass, SchemaConfiguration iDescriptor) {
if (notFountEntities.contains(iEntityName))
// AVOID TO RE-TRY TO CREATE IT: IT'S MISSED!
throw new ConfigurationNotFoundException("Class " + iEntityName);
SchemaClass entityInfo = registeredClassesNoPackage.get(iEntityName);
if (entityInfo == null)
entityInfo = createSchemaClass(iEntityName, iBaseClass, iDescriptor);
return entityInfo;
}
COM: <s> virtual class implementation by concrete java class but extended by xml descriptor </s>
|
funcom_train/50961664 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double precAtRecall(double recall) {
Iterator i = recallOrder.keySet().iterator();
double answer =0.0;
while(i.hasNext()) {
PRPair t = (PRPair)recallOrder.get(i.next());
if (!t.interpolated && t.recall>=recall && t.precision>answer)
answer=t.precision;
}
return answer;
}
COM: <s> give the number of docs retrieved and the precision for the given recall </s>
|
funcom_train/2844522 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void next() {
if (selectedAnnotations != null && selectedAnnotations.size() > 0) {
Annotation a = (Annotation)selectedAnnotations.get(selectedAnnotations.size()-1);
setAnnotation(a.getLastLeaf());
setSelection(null);
}
super.next();
}
COM: <s> activates the next annotation </s>
|
funcom_train/40516862 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void notifyEncoderStopped() {
for (int i = 0; i < encoderListeners.size(); i++) {
((JagEncoderListener) encoderListeners.elementAt(i)).rotationDidStop(new JagEncoderEvent(this,
JagEncoderEvent.STOPPED, getState(DISTANCE),
(getState(DIRECTION) == Sensor.TRUE)));
}
}
COM: <s> notifies all code jag encoder listener code s that encoder rotation has stopped </s>
|
funcom_train/28261387 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void storeImageToFile() throws IOException {
// Store bytes to image file
// Open output stream
BufferedOutputStream bdos = new BufferedOutputStream(
new DataOutputStream(new FileOutputStream(imageFile)));
// Write all bytes (as unsigned) to file
bdos.write(bytes, 0, bytes.length);
// Close output stream
bdos.close();
}
COM: <s> store image to file </s>
|
funcom_train/45117447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Method getSetter() {
Method m = new Method();
m.setAccess(Access.PUBLIC);
m.setJavadoc("set the " + name);
m.setMethodName("set" + StringUtils.firstCharToUpper(name));
m.setMethodCode("this." + name + " = " + name + ";");
m.addParameter(this);
m.setReturnType("void");
m.setThrowsName(null);
// m.setReturnArray(isArray);
return m;
}
COM: <s> get a setter method for this member </s>
|
funcom_train/12553754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setNonSetupTabsEnabled(boolean aFlag) {
for(int index = 0; index < mainGUI.getTabCount(); index++) {
if(!(index == CONNECTION_TAB_POSITION || index == DEBUG_TAB_POSITION)) {
mainGUI.setEnabledAt(index, aFlag);
}
}
mainGUI.setSelectedIndex(CONNECTION_TAB_POSITION);
}
COM: <s> enables disables all of the tabs other then the setup tab </s>
|
funcom_train/7496660 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isParseable() {
//TODO:
// In CLDR 1.7, we have no distinction between
// parseable/unparseable. Rules which have one of
// 3 suffixes below are know as unparseable for now.
// We should add the information in CLDR data.
return !(name.endsWith("-prefixpart")
|| name.endsWith("-postfixpart")
|| name.endsWith("-postfx"));
}
COM: <s> return true if the rule set can be used for parsing </s>
|
funcom_train/47514714 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean updateDeselect() {
if (frame instanceof NpairsAnalysisFrame) {
NpairsAnalysisFrame main = (NpairsAnalysisFrame)frame;
boolean pass = main.menuBar.updateDeselectMenuConds(sessionProfiles);
if(!pass){
return false;
}
// Update split partition info in NpairsAnalysisFrame
main.resamplingOptionsPanel.updateSplitPartitions();
// // Update n vol info in NpairsAnalysisFrame
// main.dataReducOptionsPanel.updateNVols(sessionProfiles);
}
return true;
}
COM: <s> update the selectable conditions for an npairs analysis </s>
|
funcom_train/50465101 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getItemCount() {
int i = 0;
if (headItem == null) return i;
ItemPanel item = headItem;
ItemPanel tailItem = null;
while (item != null) {
i++;
if (item.nextItem() == null) {
return i;
} else {
item = item.nextItem();
}
}
return i;
}
COM: <s> get the number of items in this stacked panel </s>
|
funcom_train/20504224 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetAllGenres() throws Exception {
// setting the expectations
List expectedResult = new ArrayList();
daoMock.getAllGenres();
daoMockControl.setReturnValue(expectedResult);
daoMockControl.replay();
// executing the tested method
List result = eventsCalendar.getAllGenres();
// assertions & verifications
assertSame(expectedResult, result);
daoMockControl.verify();
}
COM: <s> tests the get all genres method of the events calendar service </s>
|
funcom_train/51057770 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getStatus() {
if (fatalError) {
headlessMessage = errorMessage;
if (certificateRefused) return -2;
if (minimumJreNotFound) return -3;
return -1;
}
if (percentage == 100 && headlessWaiting) {
headlessWaiting = false;
}
if (percentage == 95) {
percentage = 100; // ready to switch applet
}
String[] message = {getDescriptionForState(), subtaskMessage};
headlessMessage = message;
return percentage;
}
COM: <s> retrieves the current status of the applet loader and is </s>
|
funcom_train/5379683 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireSelectionChanged(final SelectionChangedEvent event) {
Object[] listeners = selectionChangedListeners.getListeners();
for (int i = 0; i < listeners.length; ++i) {
final ISelectionChangedListener l = (ISelectionChangedListener) listeners[i];
SafeRunnable.run(new SafeRunnable() {
public void run() {
l.selectionChanged(event);
}
});
}
}
COM: <s> notifies any selection changed listeners that the viewers selection has changed </s>
|
funcom_train/47506812 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void revertTableChange() {
int i = 0;
String vTranslatedTable = getString(TableUtils.tableToTranslation(mFilter.getTableName()));
for (; i < mTranslatedTables.size(); i++) {
if (vTranslatedTable.equals(mTranslatedTables.get(i))) {
break;
}
}
mDontConfirmTableChange = true;//Supprime meme quand on fait un revertTableChange
mTablesSpinner.setSelection(i);
}
COM: <s> revert the table selection </s>
|
funcom_train/33912626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void connect(FlightRequest flightRequest) throws FareCrawlException {
log.info("Bootstrap.");
this.departureDate = flightRequest.getDepartureDate();
this.arrivalDate = flightRequest.getArrivalDate();
log.info("Setting up request parameters.");
Map<String, String> requestParams = setupRequestParameters(flightRequest);
log.info("Submitting HTTP request for " + Constants.TIGER + ".");
submitRequest(requestParams);
log.info("Processing HTTP response.");
processResponse();
}
COM: <s> facade method of invoking tiger airways and extracting response </s>
|
funcom_train/4868219 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(TimeStep timeStep) {
if ( ! this.messages.isEmpty() ) {
// determine if the message has expired.
Message msg = this.messages.peek();
TimeUnit.TimeUnitMinus(msg.expire, timeStep.getElapsedTime(), msg.expire);
if ( msg.expire.lessThanEq(TimeUnit.ZERO)) {
this.messages.poll();
// this.msgPool.destroy(msg);
}
}
}
COM: <s> updates the message board removes any expired messages </s>
|
funcom_train/7296156 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void copyParams(HttpParams target) {
Iterator iter = parameters.entrySet().iterator();
while (iter.hasNext()) {
Map.Entry me = (Map.Entry) iter.next();
if (me.getKey() instanceof String)
target.setParameter((String)me.getKey(), me.getValue());
}
}
COM: <s> copies the locally defined parameters to the argument parameters </s>
|
funcom_train/22368630 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setOSDHorizontalAlignment(int alignment) {
if (alignment == SwingConstants.LEFT) {
osdHorizontalAlignment.setSelectedItem(LEFT);
} else if (alignment == SwingConstants.CENTER) {
osdHorizontalAlignment.setSelectedItem(CENTER);
} else if (alignment == SwingConstants.RIGHT) {
osdHorizontalAlignment.setSelectedItem(RIGHT);
}
}
COM: <s> sets the osd horizontal alignment </s>
|
funcom_train/1116577 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getClonebutton1() {
if (clonebutton1 == null) {
clonebutton1 = new JButton();
clonebutton1.setIcon(new ImageIcon(getClass().getResource(
"/resource/Copy16.gif")));
clonebutton1.setText(Resource.getPlainResourceString("Clone"));
clonebutton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
cloneActionPerformed(e);
}
});
}
return clonebutton1;
}
COM: <s> this method initializes clonebutton1 </s>
|
funcom_train/12300871 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDescriptionPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_IOType_description_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_IOType_description_feature", "_UI_IOType_type"),
SchemaPackage.Literals.IO_TYPE__DESCRIPTION,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the description feature </s>
|
funcom_train/2584533 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConstructor2() {
LookupPaintScale s = new LookupPaintScale(1.0, 2.0, Color.red);
assertEquals(1.0, s.getLowerBound(), EPSILON);
assertEquals(2.0, s.getUpperBound(), EPSILON);
assertEquals(Color.red, s.getDefaultPaint());
}
COM: <s> some checks for the other constructor </s>
|
funcom_train/26317721 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean canInstantSwitch(int newMode) {
String newModeName = type.getMode(newMode).getName();
String curModeName = curMode().getName();
return getType().hasInstantModeSwitch() && !type.isNextTurnModeSwitch(newModeName) && !type.isNextTurnModeSwitch(curModeName);
}
COM: <s> can the switch from the current mode to the new mode happen instantly </s>
|
funcom_train/48739812 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int size() {
int total = 0;
Iterator keys = errors.keySet().iterator();
while (keys.hasNext()) {
String key = (String) keys.next();
ArrayList list = (ArrayList) errors.get(key);
total += list.size();
}
return (total);
}
COM: <s> return the number of errors recorded for all properties including </s>
|
funcom_train/44680152 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FeatureCollection checkCoincidentEdges() {
Collection edges = graph.checkCoincidentEdges();
FeatureCollection fc = new FeatureDataset(featureCollection
.getFeatureSchema());
for (Iterator i = edges.iterator(); i.hasNext();) {
SourceRoadSegment edge = (SourceRoadSegment) i.next();
fc.add(edge.getFeature());
}
return fc;
}
COM: <s> checks for coincident edges edges which are incident </s>
|
funcom_train/35461023 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int lookupImmediateParentLevel(final int level) {
int immediateParent = -1;
for (Map.Entry < Integer, Integer > entry : _levelIndents.entrySet()) {
if (entry.getKey() < level && entry.getKey() > immediateParent) {
immediateParent = entry.getKey();
}
}
return immediateParent;
}
COM: <s> search data description items already saved for a potential parent </s>
|
funcom_train/17424636 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void chainInvoke(final Invocation invocation) throws Exception {
// need to handle the registered Interceptors
Object targetComponent = invocation.getTargetComponent();
Method targetMethod = invocation.getTargetMethod();
// need to set accessible to true to ensure method can be accessed by reflection
targetMethod.setAccessible(true);
Object result = targetMethod.invoke(targetComponent, invocation.getParameters());
invocation.setResult(result);
}
COM: <s> invoke method by reflect </s>
|
funcom_train/32612319 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void map(URI boid, BindingMessageReference reference) {
URI id = ComponentIDs.id(reference);
n3(boid, Constants.WSDL_bindingMessageReference, id);
n3(id, Constants.RDF_TYPE, Constants.WSDL_BindingMessageReference);
n3(id, Constants.WSDL_binds, ComponentIDs.id(reference.getInterfaceMessageReference()));
mapExtensions(reference);
}
COM: <s> maps binding message reference components </s>
|
funcom_train/6220583 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String translateError(final String msg, final UTF8ResourceBundle bundle) {
try {
if (ConstraintViolation.REQUIRED.equals(msg)) {
return bundle.getString("alert.required");
} else if (ConstraintViolation.TYPE.equals(msg)) {
return bundle.getString("alert.type");
} else if (ConstraintViolation.FALSE.equals(msg)) {
return bundle.getString("alert.constraint");
} else {
return bundle.getString("alert.unknown");
}
} catch (Exception e) {
return "Erroneous input";
}
}
COM: <s> return the translated alert message </s>
|
funcom_train/49460983 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getRACFVersion() {
if (SMF80VRM == null)
return -1;
int ver = 0;
try {
ver = Integer.parseInt(SMF80VRM);
} catch (Exception e) {
return -1;
}
switch (ver) {
case 7720 : ver = 7; break;
case 7730 : ver = 8; break;
case 7740 : ver = 9; break;
case 7750 : ver = 10; break;
case 7760 : ver = 11; break;
default : break;
}
return ver;
}
COM: <s> returns the racf version 7 to 11 </s>
|
funcom_train/47998622 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removePlayer(long sessionID) {
Player player = ParasitesServer.PlayerManager.getPlayer(sessionID);
Entry<Player, Long> toBeRemoved = null;
for (Entry<Player, Long> entry : playerList.entrySet()) {
if (entry.getKey().equals(player)) {
toBeRemoved = entry;
break;
}
}
if (toBeRemoved != null) {
playerList.entrySet().remove(toBeRemoved);
}
}
COM: <s> this function removes the player with the session id specified as </s>
|
funcom_train/32733788 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doEndIntensiveTreatmentActivity(Patient patient) {
System.out.println(this.getClass() + ": Event " + this.getEventList().getCurrentSimEvent());
waitDelay("ExitCriticalCareProcess", 0.0, Priority.HIGH, patient);
}
COM: <s> the end intensive treatment activity event is heard by this process </s>
|
funcom_train/18104383 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
try {
mainLoop();
/*
* If mainLoop returns then thread timed out with no events
* in the queue. The thread will quietly be restarted in sched()
* when the next TimerTask is queued.
*/
} catch (Throwable t) {
// Someone killed this Thread, behave as if Timer cancelled
synchronized (queue) {
newTasksMayBeScheduled = false;
queue.clear(); // Eliminate obsolete references
}
}
}
COM: <s> start the main processing loop </s>
|
funcom_train/11729503 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRemoveStringPropertySession() throws Exception {
testNode.setProperty(propertyName1, s1);
superuser.save();
testNode.setProperty(propertyName1, (String) null);
superuser.save();
assertFalse("Removing property with Node.setProperty(String, (String)null) and Session.save() not working",
testNode.hasProperty(propertyName1));
}
COM: <s> tests if removing a code string code property with </s>
|
funcom_train/44602648 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_jml_qualified_type_reference_01() {
compileAndExecGivenStatement(
"X.java",
"class X {\n" +
" static class Y {}\n" +
" //@ requires ((java.util.Set) null) == null;\n" +
" void m() {\n" +
" }\n" +
"}\n",
"new X().m()");
}
COM: <s> jml qualified type reference </s>
|
funcom_train/5244755 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean remove(Rule l) {
if (l != null) {
PredicateIndicator key = l.getPredicateIndicator();
RuleEntry entry = ruleMap.get(key);
entry.remove(l);
if (entry.isEmpty()) {
ruleMap.remove(key);
}
size--;
boolean result = true;
return result;
}
return false;
}
COM: <s> removing a literal from the belief base </s>
|
funcom_train/13525857 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getPrefIntrinsicHeight() {
if (prefIntrinsicHeight < 0) {
Iterator iter = cells.iterator();
Cell cell;
prefIntrinsicHeight = 0;
while (iter.hasNext()) {
cell = (Cell) iter.next();
if (!cell.isMultiRowCell()) {
prefIntrinsicHeight = Math.max(prefIntrinsicHeight, cell
.getPrefHeight());
}
}
}
return prefIntrinsicHeight;
}
COM: <s> gets the preferred intrinsic height of this row </s>
|
funcom_train/2524305 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT:
public String getHostAddress() {
return (( address >>> 24 ) & 0xFF ) + "." +
(( address >>> 16 ) & 0xFF ) + "." +
(( address >>> 8 ) & 0xFF ) + "." +
(( address >>> 0 ) & 0xFF );
}
COM: <s> returns this ip adress as a </s>
|
funcom_train/21607827 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JarFile getJarFile(String jarFileUrl) throws IOException {
if (jarFileUrl.startsWith(ResourceUtils.FILE_URL_PREFIX)) {
try {
return new JarFile(ResourceUtils.toURI(jarFileUrl).getSchemeSpecificPart());
}
catch (URISyntaxException ex) {
// Fallback for URLs that are not valid URIs (should hardly ever happen).
return new JarFile(jarFileUrl.substring(ResourceUtils.FILE_URL_PREFIX.length()));
}
}
else {
return new JarFile(jarFileUrl);
}
}
COM: <s> resolve the given jar file url into a jar file object </s>
|
funcom_train/3563169 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeProgram(Long programID) throws DbException {
NVPair[] parms;
parms = new NVPair[1];
parms[0] = new NVPair("programID", programID.toString());
simpleRequest(REMOVE_PROGRAM_PAGE, "Cannot remove program", parms);
}
COM: <s> deletes a program </s>
|
funcom_train/42452698 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeClassInstances(IPersistenceObject dao, String guid) throws BasicException {
EidClassBO eidClassBO = (EidClassBO)getBusinessObject(EidClassBO.class.getName());
// Loads the object
EidObject eidObject = getEidObject(dao, guid);
// Removes each class instance
List<EidClass> classes = eidObject.getEidClasses();
for (EidClass class1 : classes) {
eidClassBO.doDelete(dao, class1);
}
}
COM: <s> removes every class instance assigned to the object from database </s>
|
funcom_train/48338186 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUpdateTimer() {
synchronized (lock) {
// Schedule the notification for every second, beginning one second
// from now, if there isn't already an active timer notification.
if (countUpdate == null) {
countUpdate = timer.schedule(Timer.FIXED_RATE,
SystemUtilities.currentTimeMillis()
+ Duration.SECOND,
Duration.SECOND,
updateHandler,
new DynamicTuple());
}
}
}
COM: <s> set up the timed count update notification </s>
|
funcom_train/3372042 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Group createTopLevelGroup(Group specifiedGroup) {
SequentialGroup group = createSequentialGroup();
if (getAutoCreateContainerGaps()) {
group.addSpring(new ContainerAutoPreferredGapSpring());
group.addGroup(specifiedGroup);
group.addSpring(new ContainerAutoPreferredGapSpring());
} else {
group.addGroup(specifiedGroup);
}
return group;
}
COM: <s> wraps the user specified group in a sequential group </s>
|
funcom_train/33915278 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("Metadata".equals(portName)) {
setMetadataEndpointAddress(address);
}
else
{ // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
COM: <s> set the endpoint address for the specified port name </s>
|
funcom_train/10749963 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetUncaughtExceptionHandler() {
ThreadGroup tg = new ThreadGroup("test thread group");
Thread t = new Thread(tg, "test thread");
Thread.UncaughtExceptionHandler hndlr = t.getUncaughtExceptionHandler();
assertSame("Thread's thread group is expected to be a handler",
tg, hndlr);
}
COM: <s> test for get uncaught exception handler </s>
|
funcom_train/18863760 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void print() {
getPrinterJob().setPrintable(this);
if (getPrinterJob().printDialog(attrs)) {
try {
getPrinterJob().print(attrs);
} catch (PrinterException pe) {
System.err.println(pe.toString());
pe.printStackTrace();
}
}
}
COM: <s> this will print the sheet checks transactions </s>
|
funcom_train/6099696 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void applyProperties(Component comp, Evaluator eval) {
if (_props == null) return;
if (eval == null) eval = Executions.getCurrent();
//apply members
synchronized (_props) {
for (Iterator it = _props.iterator(); it.hasNext();) {
final Property prop = (Property)it.next();
prop.assign(comp, eval);
}
}
}
COM: <s> applies the property initializers to the component by use of </s>
|
funcom_train/31955588 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean replaceKey(Object oldKey, Object newKey) {
if (!hash.containsKey(oldKey) || hash.containsKey(newKey)) {
return false;
}
HashedListElement e = (HashedListElement) hash.get(oldKey);
e.key = newKey;
hash.remove(oldKey);
hash.put(newKey, e);
return true;
}
COM: <s> replace the key of a given element </s>
|
funcom_train/124402 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSymbolTableNode(SymbolTableTreeNode node) {
symbolTableNode = node;
symbolTableNode.clear();
// put all symbols into node
for (Iterator iter = iterator(); iter.hasNext();) {
Symbol element = (Symbol) iter.next();
symbolTableNode.add(new SymbolTreeNode(element));
}
}
COM: <s> sets the symbol table node that represents this table in a </s>
|
funcom_train/50504478 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void load(Element config)throws ConfigurationException{
super.load(config);
if(config!=null){
includingCreateMethods = !("false".equalsIgnoreCase(config.getChildText("includingCreateMethods")));
includingFinderMethods = !("false".equalsIgnoreCase(config.getChildText("includingFinderMethods")));
}
}
COM: <s> loads this task from a jdom element </s>
|
funcom_train/3162273 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Object processChilds(EClass slice, EObject object) {
// the condition below inderctly ensures that the method is called only once
// for each object. I.e. when true class of the object and provided type match
if(object.eClass() != slice) {
return null;
}
for(Iterator i = object.eAllContents();i.hasNext();) {
Object o = i.next();
if(o instanceof EObject) {
this.doSwitch((EObject)o);
}
}
return null;
}
COM: <s> process all childs of eobject </s>
|
funcom_train/29719578 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addObservers(Vector<Player> vector) {
Vector vPlayers = game.getPlayersVector();
for (int j = 0; j < vPlayers.size(); j++) {
Player p = (Player)vPlayers.elementAt(j);
if (p.isObserver() && !vector.contains(p)) {
vector.addElement(p);
}
}
}
COM: <s> adds observers to the vector </s>
|
funcom_train/28687230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int generateLRC(String str) {
int sum = 0;
// System.out.println("Generate LRC from: "+str);
for (int i = 0; i < str.length(); i++) {
sum += str.charAt(i);
}
int computed_lrc = sum % 256;
return computed_lrc;
}
COM: <s> generate an lrc value from a given string </s>
|
funcom_train/12245512 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Phoneme getLastVoicedPhoneme() {
for (int i = syllables.size() - 1; i >= 0; i--) {
Syllable syl = (Syllable) syllables.elementAt(i);
Vector ps = syl.getPhonemes();
for (int j = ps.size() - 1; j >= 0; j--) {
Phoneme p = (Phoneme) ps.elementAt(j);
if (p.isVoiced()) {
return p;
}
}
}
return null;
}
COM: <s> retrieve the last phoneme that is voiced from the syllables vector </s>
|
funcom_train/3122142 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float totalWeight() {
float dSumWeight = 0;
Float floatWeight;
for (Iterator it = getWeights(); it.hasNext(); ) {
floatWeight = (Float) it.next();
dSumWeight += floatWeight.floatValue();
}
return (dSumWeight);
} // of method
COM: <s> sum the weight in the path </s>
|
funcom_train/32197261 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ServerUser checkAuthorization(String username, String password) {
try {
ServerUser temp = new ServerUser();
temp.setPassword(password);
temp.setUsername(username);
return (ServerUser) sqlMap.queryForObject("authorize", temp, temp);
}
catch (SQLException ex) {
ex.printStackTrace();
return null;
}
}
COM: <s> verifies a particular user to login </s>
|
funcom_train/3737937 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public XMLStreamReader createXMLStreamReader(java.io.InputStream stream) throws XMLStreamException {
try {
return createXMLStreamReader(com.bea.xml.stream.reader.XmlReader.createReader(stream));
} catch (java.io.IOException ioe) {
throw new XMLStreamException("Unable to instantiate a reader",ioe);
}
}
COM: <s> create a new xmlstream reader from a java </s>
|
funcom_train/43100162 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireTreeExpanded(TreePath path) {
super.fireTreeExpanded(path);
LOG.debug("fireTreeExpanded");
if (reexpanding) {
return;
}
if (path == null || expandedPathsInModel == null) {
return;
}
Vector expanded = getExpandedPaths();
expanded.removeElement(path);
expanded.addElement(path);
}
COM: <s> tree mmodel expansion notification </s>
|
funcom_train/12169788 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addUsedWidgetIds(String[] array) {
if (array != null) {
String last = array[array.length-1];
for (int i = 0 ; i < array.length-1; i++) {
if (last.charAt(i) == '1') {
addUsedWidgetId(array[i]);
}
}
}
}
COM: <s> calls add used widget id for each clock content id </s>
|
funcom_train/22975661 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void tryFillTripleQueue() {
while (this.sqlIterator.hasNext() && this.tripleQueue.isEmpty()) {
ResultRow nextRow = (ResultRow) this.sqlIterator.next();
Iterator it = tripleMakers.iterator();
while (it.hasNext()) {
TripleMaker tripleMaker = (TripleMaker) it.next();
Triple t = tripleMaker.makeTriple(nextRow);
if (t != null) this.tripleQueue.add(t);
}
}
}
COM: <s> puts some triples into the queue if triples can still be produced </s>
|
funcom_train/46376574 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initEntity() {
// Create this component's entity and parent it
entity = new Entity("Entity for frame component " + name);
// Create this component scene graph (l2c -> geometry)
initSceneGraph();
// Make the entity pickable
View2DCell.entityMakePickable(entity);
// Attach gui event listeners for this component
if (gui != null) {
gui.attachEventListeners(entity);
}
attachToParentEntity();
}
COM: <s> initialize this components entity </s>
|
funcom_train/27712836 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isBasicAttributeType(String type) {
return type.equals("ENTITY") || type.equals("ENTITIES") ||
type.equals("ID") || type.equals("IDREF") ||
type.equals("IDREFS") || type.equals("NMTOKEN") ||
type.equals("NMTOKENS");
}
COM: <s> returns true if the attribute type is basic </s>
|
funcom_train/10820607 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createFileByContentDir() throws IOException {
filesByContentDir = new File(baseDir, "filesByContentDir");
assertTrue(filesByContentDir.mkdirs());
// for each type create the files without its extension
File uniqueFile = new File(filesByContentDir, ""
+ System.currentTimeMillis());
TYPE.HIVERC.writer.writeTestData(uniqueFile, fileRecords, fileColumns,
colSeparator);
}
COM: <s> write out all files without there extensions </s>
|
funcom_train/21844670 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute(final InstructionContext env) throws JBasicException {
env.session.checkPermission(Permissions.LOGGING);
int logLevel = env.pop().getInteger();
if( JBasic.log == null )
env.session.initializeLog();
if( logLevel < 1 )
logLevel = 1;
else
if( logLevel > 3 )
logLevel = 3;
Value v = env.session.globals().reference("SYS$LOGLEVEL");
v.setInteger(logLevel);
JBasic.log.setLogging(logLevel);
}
COM: <s> b code logging code br br b </s>
|
funcom_train/44872198 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doCopy() {
Dimension size = canvas.getSize();
BufferedImage graphImage = (BufferedImage) canvas.createImage(
size.width, size.height);
Graphics2D g2 = graphImage.createGraphics();
g2.fillRect(0, 0, size.width, size.height);
canvas.paint(g2);
ImageSelection selection = new ImageSelection(graphImage);
clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
clipboard.setContents(selection, null);
}
COM: <s> method to copy graph to the clipboard </s>
|
funcom_train/22927315 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
PresentationReconciler reconciler = new PresentationReconciler();
DefaultDamagerRepairer dr = new DefaultDamagerRepairer(new FloraCodeScanner());
reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
dr = new DefaultDamagerRepairer(new FloraCommentScanner());
reconciler.setDamager(dr, FloraPartitionScanner.FLORA_SINGLE_LINE_COMMENT);
reconciler.setRepairer(dr, FloraPartitionScanner.FLORA_SINGLE_LINE_COMMENT);
reconciler.setDamager(dr, FloraPartitionScanner.FLORA_MULTI_LINE_COMMENT);
reconciler.setRepairer(dr, FloraPartitionScanner.FLORA_MULTI_LINE_COMMENT);
return reconciler;
}
COM: <s> returns the presentation reconciler ready to be used with the given source viewer </s>
|
funcom_train/18346908 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isInSameSpace(CommonConceptKey other) {
if (!getType().isAssignableFrom(other.getType())) {
return false;
}
for (int i = 0; i < size(); i++) {
int c = ((Comparable) get(i)).compareTo(other.get(i));
if (c != 0) {
return false;
}
}
return true;
}
COM: <s> checks whether this key share same key space as the another </s>
|
funcom_train/16081539 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private QueueElement processChildren(QueueElement element) {
File[] children = element.getFile().getReference().listFiles();
if (children != null) {
for (File child : children) {
JMCFile f = JMCFileFactory.getJMCFile(child, element.getFile().getCatalog());
element.getFile().addChild(f);
// add file to processing
Container.getInstance().getInsertService().process(f);
}
}
return element;
}
COM: <s> adds all child files to processing </s>
|
funcom_train/10888956 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addULong(int value) {
addByte((byte) (value & 0xff));
addByte((byte) (value >> 8 & 0xff));
addByte((byte) (value >> 16 & 0xff));
addByte((byte) (value >> 24 & 0xff));
}
COM: <s> adds a ulong to the response </s>
|
funcom_train/50334722 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Dimension getPreferredSize() {
// limit preferred size to size of screen (from getMaximumSize())
Dimension screen = getMaximumSize();
int width = Math.min(super.getPreferredSize().width, screen.width);
int height = Math.min(super.getPreferredSize().height, screen.height);
return new Dimension(width, height);
}
COM: <s> the preferred size must fit on the physical screen so </s>
|
funcom_train/17755711 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void error(int code, final String message, Throwable throwable) {
IStatus status = new Status(IStatus.ERROR, pluginName_, code, message, throwable);
log_.log(status);
Display.getDefault().asyncExec(new Runnable() {
public void run() {
MessageDialog.openWarning(null, "Error: " + message, message);
}});
}
COM: <s> log an error </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.