__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/50842065 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDeleteAction(Table table, Row row, int[] colMap) {
// tempActionHistory.add("add delete action " + actionTimestamp);
if (abortTransaction) {
// throw Error.error(ErrorCode.X_40001);
}
database.txManager.addDeleteAction(this, table, row, colMap);
}
COM: <s> adds a delete action to the row and the transaction manager </s>
|
funcom_train/28760791 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCssheadsize(String newVal) {
if ((newVal != null && this.cssheadsize != null && (newVal.compareTo(this.cssheadsize) == 0)) ||
(newVal == null && this.cssheadsize == null && cssheadsize_is_initialized)) {
return;
}
this.cssheadsize = newVal;
cssheadsize_is_modified = true;
cssheadsize_is_initialized = true;
}
COM: <s> setter method for cssheadsize </s>
|
funcom_train/36072536 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private RegistryClient getRegistry(String url) {
System.err.println("private RegistryClient getRegistry(String url) - start...");
RegistryClient rc = new RegistryClientImpl(
url,
new MySecurityProvider(),
new MyHandlerProvider(),
props,
null,
cache);
System.err.print(" ok");
return rc;
}
COM: <s> get the registry client for the provided service url </s>
|
funcom_train/32871122 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addMethodReturn(Method m) {
throw new JVMAIRuntimeException("Method HotSwapAdvancedClassWeaver.addMethodReturn() not implemented");
// String key = m.getDeclaringClass().getName() + "#" + m.getName();
// if( ! methodReturns.containsKey( key ) ) {
// methodReturns.put( key, m );
// addWatch(MWEAVER_STATUS_HAS_METHOD_RETURN_WATCH);
// }
}
COM: <s> add a method for which a callback should be woven after each call </s>
|
funcom_train/8064465 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void defineButtons() {
Vector v = new Vector();
add(new CmdCreateNode(NodeCPU.class, "CPU"), "CPU", "NodeOne");
add(new CmdCreateNode(NodePrinter.class, "Printer"), "Printer", "NodeOne");
add(new CmdCreateNode(NodeWall.class, "Wall"), "Wall", "NodeOne");
}
COM: <s> define a button to make for the example application </s>
|
funcom_train/31947698 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDisplayNamePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_EUser_displayName_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_EUser_displayName_feature", "_UI_EUser_type"),
SailuserdataPackage.Literals.EUSER__DISPLAY_NAME,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the display name feature </s>
|
funcom_train/18886599 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void bind(VTDNav vn){
if (vn==null)
throw new IllegalArgumentException("vn can't be null");
vn1 = vn;
if (ba == null || vn.nestingLevel+8 != ba.length)
ba = new int[vn.nestingLevel + 8];
ba[0]= -2 ; // this would never happen in a VTDNav obj's context
}
COM: <s> bind a book mark object to a vtdnav object </s>
|
funcom_train/6512277 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void perform(WikiSystem wiki, WebContext wc, WikiUser user, WikiPage page) throws PageAction.PageActionException {
String pageName = wc.getForm ("jump");
pageName = WikiUtil.guessWikiTitle(pageName, wiki);
throw new PageAction.RedirectException (pageName);
}
COM: <s> we redirect to the page that most closely matches whatever the </s>
|
funcom_train/48337835 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int findVictim() {
int victim = -1;
int start = counter;
while (victim == -1) {
if (refbits.get(counter) == false) {
victim = counter;
} else {
refbits.clear(counter);
}
// next entry
counter++;
// if past last element, wrap around
if (counter == size) {
counter = 0;
}
}
return victim;
}
COM: <s> finds a victim to evict from the cache </s>
|
funcom_train/37482943 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int tickMax(double upperLimit, int tickSpace) {
int tempTickMax;
if ((upperLimit % tickSpace) == 0) { //upper limit is a tick
tempTickMax = (int)Math.floor(upperLimit);
} else {
tempTickMax = ((int)upperLimit / tickSpace) * tickSpace;
//round down for last tick
}
return tempTickMax;
}
COM: <s> placement of maximum tick for linear </s>
|
funcom_train/459471 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getNetworkAccessPointTypeCode() {
if ( activeParticipantNode.hasAttribute("NetworkAccessPointTypeCode") && !activeParticipantNode.getAttribute("NetworkAccessPointTypeCode").equals("") )
return activeParticipantNode.getAttribute("NetworkAccessPointTypeCode") ;
else return null ;
}
COM: <s> gets the value of the network access point type code property </s>
|
funcom_train/46694684 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBuildingStatus() {
System.out.println("buildingStatus");
LinkByProperty instance = new LinkByProperty();
assertEquals(State.UNINITIALIZED,instance.buildingStatus());
instance.buildQuery("property", false, new NullPropertyQuery());
assertEquals(State.READY,instance.buildingStatus());
}
COM: <s> test of building status method of class link by property </s>
|
funcom_train/15662932 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ApplicationsBean loadUniqueUsingTemplate(ApplicationsBean bean) throws DAOException {
ApplicationsBean[] beans = this.loadUsingTemplate(bean);
if (beans.length == 0) {
return null;
}
if (beans.length > 1) {
throw new ObjectRetrievalException("More than one element !!");
}
return beans[0];
}
COM: <s> loads a unique applications bean bean from a template one giving a c </s>
|
funcom_train/22712148 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTestSessionContainer(String id, TestSessionContainer container) {
if (id == null) {
throw new NullPointerException("id == null");
}
if (container == null) {
throw new NullPointerException("container == null");
}
this.testSessionContainers.put(id, container);
}
COM: <s> stores the given </s>
|
funcom_train/27747674 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int indexOf (CoolItem item) {
checkWidget();
if (item == null) error (SWT.ERROR_NULL_ARGUMENT);
if (item.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT);
int answer = 0;
for (int row = 0; row < items.length; row++) {
for (int i = 0; i < items[row].length; i++) {
if (items[row][i].equals(item)) {
return answer;
} else {
answer++;
}
}
}
return -1;
}
COM: <s> searches the receivers items in the order they are currently </s>
|
funcom_train/43827463 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addVariablesPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_VariableDeclaration_variables_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_VariableDeclaration_variables_feature", "_UI_VariableDeclaration_type"),
DeclarationPackage.Literals.VARIABLE_DECLARATION__VARIABLES,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the variables feature </s>
|
funcom_train/12807944 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasRowspan(final int rowIdx) {
if (rowIdx < rows.size() && getRow(rowIdx).hasRowspan()) {
return true;
}
for (int i = 0; i < getNumberOfColumns(); i++) {
if (rowSpanAbove(rowIdx - 1, i))
return true;
}
return false;
}
COM: <s> checks if a cell in a row has a rowspan greater than 1 </s>
|
funcom_train/450653 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone () {
Behavior clone = new Behavior();
//Copy all actions.
Iterator actions = actionIterator();
while (actions.hasNext()) {
Action action = (Action) actions.next();
clone.addAction((Action) action.clone());
}
//Copy all conditions.
Iterator conditions = conditionIterator();
while (conditions.hasNext()) {
Condition condition = (Condition) conditions.next();
clone.addCondition((Condition) condition.clone());
}
return clone;
}
COM: <s> copy this behavior including all conditions and actions </s>
|
funcom_train/20913419 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String methodHelp(String methodName) {
Object handler = _callManager.getHandlerForCall(methodName);
String handlerMethod = _callManager.getMethodForCall(methodName);
if (handler != null && handler instanceof Handler) {
return((Handler)handler).getMethodHelp(handlerMethod);
} else {
return "Sorry. No help is available for this method.";
}
}
COM: <s> returns a string containing help on a particular method </s>
|
funcom_train/4124118 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FreeColAction getFreeColAction(String id) {
Iterator<Option> it = iterator();
while (it.hasNext()) {
FreeColAction fa = (FreeColAction) it.next();
if (fa.getId().equals(id)) {
return fa;
}
}
return null;
}
COM: <s> gets the code free col action code specified by the given </s>
|
funcom_train/4530507 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processDeleteOnExit() {
synchronized (deleteOnExit) {
for (Iterator<Path> iter = deleteOnExit.iterator(); iter.hasNext();) {
Path path = iter.next();
try {
delete(path, true);
}
catch (IOException e) {
LOG.info("Ignoring failure to deleteOnExit for path " + path);
}
iter.remove();
}
}
}
COM: <s> delete all files that were marked as delete on exit </s>
|
funcom_train/16604595 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addShape(Shape shape) {
if (shape.points.length != points.length) {
throw new RuntimeException("Attempt to morph between two shapes with different vertex counts");
}
Shape prev = (Shape) shapes.get(shapes.size()-1);
if (equalShapes(prev, shape)) {
shapes.add(prev);
} else {
shapes.add(shape);
}
if (shapes.size() == 2) {
next = (Shape) shapes.get(1);
}
}
COM: <s> add a subsequent shape that we should morph too in order </s>
|
funcom_train/45251063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleSelectionChanged() {
ISelection selection = typesListViewer.getSelection();
boolean hasSelection = selection != null
&& selection.isEmpty() == false;
WorkingSetDescriptor descriptor = getSelectedWorkingSet();
setDescription(descriptor == null ? "" : descriptor.getDescription()); //$NON-NLS-1$
setPageComplete(hasSelection);
}
COM: <s> called when the selection has changed </s>
|
funcom_train/32056731 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetIsMetric() {
System.out.println("testSetIsMetric");
int i = 1;
boolean b = true;
JGraph g = new JGraph( new DefaultGraphModel() );
Rule x = new Rule(i, b, g);
x.setIsMetric(b);
// return is void, so no assertEquals()
}
COM: <s> test of set is metric method of class rule </s>
|
funcom_train/44549988 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean exists(String[] keys) {
boolean exists = true;
DefaultMutableTreeNode node = top;
for (int level = 1; level < keys.length; level++) {
node = findNode(keys[level], node, false);
exists &= node != null;
}
return exists;
}
COM: <s> checks if the keys chain exists </s>
|
funcom_train/21318009 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // public void validateDrawerEntries(String drawerLabel, String[] entryLabels) {
// //navigate through the list of drawers
// //as find an entryLabel, remove it from the list
// //what labels remain in the list were not found
// //what's not in the list, print out as being extra
// }
COM: <s> verifies a drawer contains the specified entries </s>
|
funcom_train/16103185 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getTxtHost() {
if (txtHost == null) {
txtHost = new JTextField();
txtHost.setText("Hostname"); //$NON-NLS-1$
txtHost.setPreferredSize(new java.awt.Dimension(100, 20));
txtHost.setMinimumSize(new java.awt.Dimension(100, 20));
}
return txtHost;
}
COM: <s> this method initializes txt host </s>
|
funcom_train/39468813 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void copyFile(@NotNull final File src, @NotNull final File dest) throws IOException {
if (dryRun) {
return;
}
final InputStream in = new FileInputStream(src);
try {
final OutputStream out = new FileOutputStream(dest);
try {
copy(in, out);
} finally {
out.close();
}
} finally {
in.close();
}
}
COM: <s> copies a file into another </s>
|
funcom_train/42036550 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Date parseRFC822(String sDate) {
int utIndex = sDate.indexOf(" UT");
if (utIndex > -1) {
String pre = sDate.substring(0, utIndex);
String post = sDate.substring(utIndex + 3);
sDate = pre + " GMT" + post;
}
return parseUsingMask(RFC822_MASKS, sDate);
}
COM: <s> parses a date out of a string with a date in rfc822 format </s>
|
funcom_train/43856158 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean getResults(SimpleConnection sc) throws IOException {
String msg = sc.hardListen();
if (msg.equals("end"))
return false;
while (!msg.equals("end")) {
String[] data = msg.split(" ");
String candidateName = data[0];
String address = data[1];
try {
int port = Integer.parseInt(data[2]);
synchronized (candidates) {
AddressPort ap = new AddressPort(candidateName, address,
port);
displayln(ap.toString());
if (!candidates.contains(ap))
candidates.addLast(ap);
}
} catch (NumberFormatException e) {
e.printStackTrace();
}
msg = sc.hardListen();
}
return true;
}
COM: <s> system must have sent peer list request to tracker </s>
|
funcom_train/5606869 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void parseMode(String mode) {
if (mode.equals("r")) {
readable = true;
} else if (mode.equals("w")) {
writable = true;
} else if (mode.equals("rw")) {
readable = writable = true;
} else {
throw Py.ValueError("invalid mode: '" + mode + "'");
}
}
COM: <s> parse the raw io socket mode string </s>
|
funcom_train/18787855 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processPackage(MetaPackage source, MModel context) {
assert (source != null) && (context != null);
MPackage mPackage = findPackageQualified(context, source.getName());
if (mPackage == null)
return;
for (MetaClass item : source.getClasses()) {
extractClass(item, mPackage);
}
}
COM: <s> processes childeren classes of a package </s>
|
funcom_train/14307994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dragGestureRecognized(DragGestureEvent evt) {
//Log.log( Log.DEBUG, this, "Received drag gesture" );
Object node = getLastSelectedPathComponent();
if(!(node instanceof ProjectFile))
return;
evt.getDragSource().startDrag(evt,
DragSource.DefaultMoveNoDrop,(Transferable)node,this);
}
COM: <s> recognize a drag gesture </s>
|
funcom_train/2904585 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setLogFilePath(String configFile) {
try {
File f = (new File(configFile));
if (f != null) {
this.logFilePath = f.getAbsolutePath();
} else {
new JXError("FileLogger: log file(" + configFile + ") not found.");
}
} catch (Exception e) {
e.printStackTrace();
}
}
COM: <s> sets the full path of the log file </s>
|
funcom_train/51418464 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSourceMetaModelPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ProjectNode_sourceMetaModel_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ProjectNode_sourceMetaModel_feature", "_UI_ProjectNode_type"),
JetsetPackage.Literals.PROJECT_NODE__SOURCE_META_MODEL,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the source meta model feature </s>
|
funcom_train/25066064 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void retrieveAndDisplayDataByBSEntityAcc(String acc) {
try {
sampleDataPanel.fetchAndDisplayDataByEntityAcc(acc);
}
catch (RuntimeException e) {
logger.error("SiteManager fetchAndDisplayDataByEntityAcc caught exception " + e.getMessage(), e);
throw e;
}
}
COM: <s> this gets called once by read panel </s>
|
funcom_train/20728477 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getObject(String sFieldNameIn, IntHolder iFieldTypeOut) {
try {
return getObject(resultSet.findColumn(sFieldNameIn), iFieldTypeOut);
} catch (Exception e) {
SystemLog.ProblemPrintln("Error:" + e.getMessage());
e.printStackTrace();
}
return null;
}//}}}
//{{{ +getTable() : AbstractTableModel
COM: <s> returns the result field value from the last search or movement in the </s>
|
funcom_train/18756162 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Component addComponent(Component c) {
Component retVal = null;
// Use locals for a convenient reference point
// to check when debugging.
double componentSize = c.getPreferredSize().getHeight();
if ((myHeight + componentSize) < maximumHeight) {
retVal = super.add(c);
myHeight += componentSize;
}
else {
// Create the more menu if necessary
createSubMoreMenu();
retVal = moreMenu.addComponent(c);
}
return retVal;
}
COM: <s> convenience add on allows for easy integration to </s>
|
funcom_train/36466787 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateMember(FlockMember member, Canvas canvas) {
int separation = getParameterValue(SEPARATION);
int groupsep = getParameterValue(GROUP_SEPARATION);
int alignment = getParameterValue(ALIGNMENT);
Dimension size = new Dimension(getParameterValue(WIDTH),
getParameterValue(HEIGHT));
int maxspeed = getParameterValue(MAX_SPEED);
Color bc = new Color(getParameterValue(RED_CONTENT),
getParameterValue(GREEN_CONTENT),
getParameterValue(BLUE_CONTENT));
member.updateParameters(canvas.getGroups(), this, separation, groupsep,
alignment, size, maxspeed, bc);
member.wrap(canvas.getSize());
member.update(canvas);
}
COM: <s> updates a flock members position with respect to the canvas </s>
|
funcom_train/37854588 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAuthenticationManager(ISVNAuthenticationManager authManager) {
myAuthManager = authManager;
Map pool = getPool();
for (Iterator protocols = pool.keySet().iterator(); protocols.hasNext();) {
String key = (String) protocols.next();
SVNRepository repository = (SVNRepository) pool.get(key);
repository.setAuthenticationManager(myAuthManager);
}
}
COM: <s> sets the given authentication instance to this pool and to all </s>
|
funcom_train/22430361 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void bingo(int risk, int reliability, String uri, String param, String otherInfo, HttpMessage msg) {
bingo(risk, reliability, this.getName(), this.getDescription(), uri, param, otherInfo, this.getSolution(), msg);
}
COM: <s> generate an alert when a security issue risk info is found </s>
|
funcom_train/49760504 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getJTextField_BackEndCurDir() {
if (jTextField_BackEndCurDir == null) {
jTextField_BackEndCurDir = new JTextField();
jTextField_BackEndCurDir.setBounds(new Rectangle(15, 165, 256, 20));
}
return jTextField_BackEndCurDir;
}
COM: <s> this method initializes j text field back end cur dir </s>
|
funcom_train/3375307 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLayoutOrientation(int layoutOrientation) {
int oldValue = this.layoutOrientation;
switch (layoutOrientation) {
case VERTICAL:
case VERTICAL_WRAP:
case HORIZONTAL_WRAP:
this.layoutOrientation = layoutOrientation;
firePropertyChange("layoutOrientation", oldValue, layoutOrientation);
break;
default:
throw new IllegalArgumentException("layoutOrientation must be one of: VERTICAL, HORIZONTAL_WRAP or VERTICAL_WRAP");
}
}
COM: <s> defines the way list cells are layed out </s>
|
funcom_train/45239479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JNumberFloatField getJNumberFloatFieldPesosSitiosF84() {
if (jNumberFloatFieldPesosSitiosF84 == null) {
jNumberFloatFieldPesosSitiosF84 = new JNumberFloatField();
jNumberFloatFieldPesosSitiosF84.setSize(new Dimension(65, 20));
jNumberFloatFieldPesosSitiosF84.setLocation(new Point(330, 153));
}
return jNumberFloatFieldPesosSitiosF84;
}
COM: <s> this method initializes j number float field pesos sitios f84 </s>
|
funcom_train/19456666 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void putDirectory(List list) {
byte[] directory = new byte[2048];
int count = list.size();
int offset = 0;
for (int i = 0; i < count; i++) {
byte[] entry = ((PascalFileEntry) list.get(i)).toBytes();
System.arraycopy(entry, 0, directory, offset, entry.length);
offset += ENTRY_SIZE;
}
writeDirectory(directory);
}
COM: <s> write the revised directory </s>
|
funcom_train/33380957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void prepareStatement(String sqlString, PyObject maxRows) throws SQLException {
int maxrows = 0;
if(!maxRows.equals(Py.None)) {
maxrows = ((Integer) maxRows.__tojava__(Integer.class)).intValue();
}
this.sqlStatement = this.connection.prepareStatement(sqlString);
this.sqlStatement.setMaxRows(maxrows);
}
COM: <s> prepare a statement ready for executing </s>
|
funcom_train/3440620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Receiver getReceiverReferenceCounting() throws MidiUnavailableException {
/* Keep this order of commands! If getReceiver() throws an exception,
openInternal() should not be called!
*/
Receiver receiver;
synchronized (traRecLock) {
receiver = getReceiver();
AbstractMidiDevice.this.openInternal(receiver);
}
return receiver;
}
COM: <s> retrieve a receiver and open the device implicitly </s>
|
funcom_train/16461868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void init() throws SmsInternetServiceInitialisationException {
LOG.trace("ENTER");
initGateway();
try{
service.startService();
connected = true;
this.setStatus(SmsInternetServiceStatus.CONNECTED, null);
} catch (Throwable t) {
LOG.debug("Could not connect", t);
connected = false;
this.setStatus(SmsInternetServiceStatus.FAILED_TO_CONNECT, null);
throw new SmsInternetServiceInitialisationException(t);
}
LOG.trace("EXIT");
}
COM: <s> starts the service </s>
|
funcom_train/34608426 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: /** public Point getScreenCoordinatesOfEntity(ChartEntity e) {
String shapeCoords = e.getShapeCoords();
String[] shapeCoords_array = shapeCoords.split(",");
// I decided that these points are most like the center of the circle-area
return new Point(
Integer.parseInt(shapeCoords_array[2]),
Integer.parseInt(shapeCoords_array[1]));
}*/
COM: <s> returns the screen relative coordinates of an entity </s>
|
funcom_train/4546789 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addEntry(int num, long duration, long mediaTime, int mediaRate) {
setNumEntries(num);
setDuration(num - 1, duration);
setMediaTime(num - 1, mediaTime);
setMediaRate(num - 1, mediaRate);
}
COM: <s> add an entry to the edit list </s>
|
funcom_train/36955879 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void chooseSuperModules() {
ISourceFolder root= getSourceFolder();
if (root == null) {
return;
}
IRubyProject project= root.getRubyProject();
SuperModuleSelectionDialog dialog= new SuperModuleSelectionDialog(getShell(), getWizard().getContainer(), this, project);
dialog.setTitle(getModuleDialogTitle());
dialog.setMessage(NewWizardMessages.NewTypeWizardPage_InterfacesDialog_message);
dialog.open();
}
COM: <s> opens a selection dialog that allows to select the super interfaces </s>
|
funcom_train/51640512 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected IJavaElement findElementToSelect(IJavaElement je) {
if (je == null)
return null;
switch (je.getElementType()) {
case IJavaElement.JAVA_MODEL :
return null;
case IJavaElement.JAVA_PROJECT:
return je;
case IJavaElement.PACKAGE_FRAGMENT_ROOT:
if (je.getElementName().equals(IPackageFragmentRoot.DEFAULT_PACKAGEROOT_PATH))
return je.getParent();
else
return je;
default :
return findElementToSelect(je.getParent());
}
}
COM: <s> finds the element which has to be selected in this part </s>
|
funcom_train/11376431 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void cleanup(ConfigExtractor cfg) throws IOException {
FileSystem fs = FileSystem.get(cfg.getConfig());
Path base = cfg.getBaseDirectory();
if (base != null) {
LOG.info("Attempting to recursively delete " + base);
fs.delete(base, true);
}
}
COM: <s> cleans up the base directory by removing it </s>
|
funcom_train/42567210 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setValues() {
if(isEditing()) {
jtfPrefix.setText(course.getPrefix());
jtfNumber.setText(String.valueOf(course.getNumber()));
jtfTitle.setText(course.getTitle());
jtfCreditHours.setText(String.valueOf(course.getHours()));
sections = new ArrayList<Section>(course.getSections());
}
}
COM: <s> set the values of our text fields </s>
|
funcom_train/147561 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JButton getButton(String imageName, String actionCommand, String toolTipText, String altText) {
JButton button = new JButton();
// Create and initialize the button
button.setActionCommand(actionCommand);
button.setToolTipText(toolTipText);
button.addActionListener(getParentObject());
button.setIcon(sys.getIcon(imageName));
return button;
}
COM: <s> constructs a jbutton for use in a toolbar </s>
|
funcom_train/23297268 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String readWord() throws IOException {
StringBuffer buffer = new StringBuffer();
int c;
c = skipWhiteSpace();
// search for last non-whitespace character
while (c != EOF && !Character.isWhitespace(c)) {
buffer.append( (char) c );
c = pbReader.read();
}
// put back the whitespace character
if (c != EOF) {
pbReader.unread(c);
}
return buffer.toString();
}
COM: <s> read a word from stream </s>
|
funcom_train/8088678 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void calculateConfirmation() {
double expected = getExpectedFrequency();
double observed = getObservedFrequency();
if ((expected == 0) || (expected == 1)) {
m_confirmation = 0;
} else {
m_confirmation = (expected - observed) / (Math.sqrt(expected) - expected);
}
}
COM: <s> calculate the confirmation of this rule </s>
|
funcom_train/35675126 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void check(final String schemaName) throws Exception {
check(new File(SRC_REF_DIR, GEN_SRC_SUBDIR + "/"
+ schemaName.replace(".", "/")), new File(GEN_SRC_DIR,
GEN_SRC_SUBDIR + "/" + schemaName.replace(".", "/")), "java");
}
COM: <s> a helper method to generate and check against a reference </s>
|
funcom_train/42398624 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void copyHeaders(final HttpServletRequest source, final Headers destination) {
Checker.notNull("parameter:source", source);
Checker.notNull("parameter:destination", destination);
final Enumeration names = source.getHeaderNames();
while (names.hasMoreElements()) {
final String name = (String) names.nextElement();
final Enumeration values = source.getHeaders(name);
while (values.hasMoreElements()) {
String value = (String) values.nextElement();
destination.add(name, value);
}
}
}
COM: <s> helper which copies all headers from a http servlet request to a headers </s>
|
funcom_train/12836919 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(final Locator aLoc) {
if (this.get(JasConstants.AGENT_DISPLAY_NAME) != null
&& aLoc.get(JasConstants.AGENT_DISPLAY_NAME) != null)
return this.getAddress().equals(aLoc.getAddress())
&& this.get(JasConstants.AGENT_DISPLAY_NAME).equals(
aLoc.get(JasConstants.AGENT_DISPLAY_NAME));
else
return this.getAddress().equals(aLoc.getAddress());
}
COM: <s> address based equality check </s>
|
funcom_train/42862074 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Result getBindings() {
BackwardChainer reasoner = new AbductiveBackwardChainer(debuggerRuleStore.getKnowledgeBase());
List<Atom> activeBodyAtoms = new ArrayList<Atom>();
for (DebuggerAtom da: bodyClauses) {
if (da.isActive()) activeBodyAtoms.add(da.getAtom());
}
Result toReturn = reasoner.hasProof(activeBodyAtoms.toArray(new Atom[0]));
return toReturn;
}
COM: <s> returns the bindings for the variables only of the active literals </s>
|
funcom_train/5480606 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processCommandsForCharacterSet(String currentSet,String newSet) throws TextPrinterException {
if (!currentSet.equals(newSet))
if (!newSet.equals("")) {
String mappedSet=mapTableLookup(this.charSetValues,newSet);
if (mappedSet!=null) {
executeCommand(this.CMD_SELECT_CHAR_SET,mappedSet);
}
}
}
COM: <s> enable new character set </s>
|
funcom_train/32057840 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRemoveBarEntry() {
System.out.println("testRemoveBarEntry");
GPBarFactory.removeBarEntry(new GPBarEntry("bkey", 14, "bvalue"));
GPBarEntry e = new GPBarEntry("barkey", 10, "barvalue");
GPBarFactory.addBarEntry(e);
GPBarFactory.removeBarEntry(e);
}
COM: <s> test of remove bar entry method of class gpbar factory </s>
|
funcom_train/24153841 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setVolume(int volume) {
for (MP3PlayerListener listener : getMP3PlayerListeners()) {
listener.onSetVolume(MP3Player.this, volume);
}
if (volume < 0 || volume > 100) {
throw new RuntimeException("Wrong value for volume, must be in interval [0..100].");
}
this.volume = volume;
if (mp3 != null) {
mp3.setVolume(volume);
}
}
COM: <s> sets the volume of the player </s>
|
funcom_train/18569804 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIsAssignableFromDifferentClass() {
Class[] newArgTypes = new Class[] {String.class, Integer.class};
Signature newSignature =
new Signature(String.class, "myMethod", newArgTypes);
assertFalse(newSignature.isAssignableFrom(signature));
}
COM: <s> test the is assignable from method when it returns false due to comparing </s>
|
funcom_train/35612808 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setView(boolean isDefault) {
content.getRowFormatter().setVisible(1, isDefault);
for (int i=2; i<6; i++) {
content.getRowFormatter().setVisible(i, !isDefault);
}
warning.setVisible(useDefault.getValue());
DynamicCompilerSettingsDialog.this.center();
}
COM: <s> updates the form view </s>
|
funcom_train/13333933 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void onClickClearClipboard() {
candidateTermsTable.getModel().unTickAll();
clipboard.clear();
// clear
clearAllDependendOnSelectedTerm();
clipboardTabPanel
.setTitleAt(
0,
Messages.getString("OntologyGenerationComponent.ClipboardTabPanelTitle") + "(" + clipboard.getSize() + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
guiComponent.updateUI();
}
COM: <s> clears the clip board </s>
|
funcom_train/50506254 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IProject getCurrentProject() {
log.debug("Evaluating current project...");
Browser browser = Browser.getActiveBrowser();
if(browser == null) {
return null;
}
Project p = browser.getActiveProject();
log.debug("Returning current project: " + p.getDisplayName());
return getProject(p.getDisplayName());
}
COM: <s> gets the current project attribute of the jbuilder editor app object </s>
|
funcom_train/36635872 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void renderConstantSize(GLAutoDrawable d, Camera camera) {
GL gl = d.getGL();
double scale = camera.getHeight() * constantSize;
gl.glPushMatrix();
gl.glScaled(scale, scale, scale);
glRender(d);
gl.glPopMatrix();
}
COM: <s> render the axes at a constant size in the given camera </s>
|
funcom_train/3653167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addRegistry(Registry registry) {
ClassLib.DEBUG(getClass(), "add_registry", registry);
systemRegistry.addRegistry(registry);
// whenever we see a new Registry, we'll want
// gather up any type definitions it has and
// import them to XTypeLib
XTypeLib.getInstance().loadTypes(registry);
}
COM: <s> adds the given registry to the unified view of </s>
|
funcom_train/42713721 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected PumsPopulation newPumsPopulation(String hohID, CSVTable schema, List<String> attributeValues) {
int[] values = new int[attributeValues.size()];
for (int v = 0; v < attributeValues.size(); v++) {
values[v] = parseInt(attributeValues.get(v));
}
return new PumsPopulation(hohID, schema, values);
}
COM: <s> helper to make a pums population by running string attributes through parse int </s>
|
funcom_train/17857161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object pclone() {
ArrayList clone = null;
try {
clone = (ArrayList) super.pclone();
if(data != null) {
clone.data = new Object[data.length];
for(int i=0;i<data.length;i++) clone.data[i]=data[i];
}
//clone.data = (Object[]) data.pclone();
} catch (CloneNotSupportedException e) {
// Impossible to get here.
}
return clone;
}
COM: <s> creates a shallow copy of this array list elements are not cloned </s>
|
funcom_train/9237437 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean handleReceive() {
try {
final byte[] data = new byte[blockSize];
final int bytesRead = in.read(data);
readSize = readSize + bytesRead;
if (bytesRead > 0) {
fileOut.write(data, 0, bytesRead);
out.writeInt(bytesRead);
out.flush();
if (readSize == size) {
fileOut.close();
return false;
} else {
return true;
}
} else if (bytesRead < 0) {
fileOut.close();
return false;
}
} catch (IOException e) {
return false;
}
return false;
}
COM: <s> handle the socket as a receive </s>
|
funcom_train/6279391 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getContentType() throws MessagingException, IOException {
Part part;
//case : Multipart message
if (message.isMimeType("multipart/*")) {
Multipart mp = (Multipart) message.getContent();
for (int c = 0, n = mp.getCount(); c < n; c++) {
part = mp.getBodyPart(c);
if (part
.getContentType()
.toLowerCase()
.startsWith("text/html")) {
return "html";
}
}
}
return "plain";
}
COM: <s> method get txt content </s>
|
funcom_train/50923569 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getAuxFileName() {
if (auxFileName == null) {
auxFileName = ((ConverterCommand)this.getCommand()).getAuxfileName();
if (auxFileName != null) {
File f = new File(auxFileName);
System.out.println("FILE "+f.getAbsolutePath());
LOG.debug("aux file: "+auxFileName);
}
}
return auxFileName;
}
COM: <s> get auxfile name </s>
|
funcom_train/23012426 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void broadcastMessage(int code, Object message) {
if (isKilled)
return;
int count = statusListeners.size();
for (int i = 0; i < count; i++) {
((StatusListener) statusListeners.elementAt(i)).notifyStatus(code,
message);
}
}
COM: <s> notifies status listener implementations about map or proxy events </s>
|
funcom_train/28352743 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void freezeParametersOfDisabledCavities() {
final Iterator cavityIter = getNodeAgentsOfType( RfCavity.s_strType ).iterator();
while ( cavityIter.hasNext() ) {
final RFCavityAgent cavityAgent = (RFCavityAgent)cavityIter.next();
final LiveParameter amplitudeParam = cavityAgent.getAmplitudeParameter();
if ( amplitudeParam.getInitialValue() == 0.0 ) {
amplitudeParam.setIsVariable( false );
cavityAgent.getPhaseParameter().setIsVariable( false );
}
}
}
COM: <s> freeze the parameters of a cavity if its amplitude is zero </s>
|
funcom_train/13980472 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startProcess () {
System.out.println();
System.out.println(this + " Session is trying to be started now.");
drawRequester = null;
if (state == SCondition.AT_RESPONDING) {
state = SCondition.AT_PROCESS;
board = new Board(this, params);
board.startGame();
timeStamp = System.currentTimeMillis();
System.out.println("\t\tsession was started.");
} else {
System.out.println("\t\tunable to start this session because of state.");
}
}
COM: <s> starts a game of this session init board </s>
|
funcom_train/14266383 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void dumpQueueStats() {
synchronized (_outputQueueLock) {
for (int i=0; i<PRIORITIES; i++) {
System.out.println(i+" "+_outputQueue[i].size());
}
System.out.println("* "+_queued+"\n");
}
}
COM: <s> for debugging only prints to stdout the number of queued messages in </s>
|
funcom_train/49627439 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setData(final Collection<T> data) {
for (T dataObject : data) {
if (!this.duration.contains(dataObject.getDuration())) {
continue;
}
for (ResultIHasDurationDataMatrixRow<T, U, V> row : this.rows) {
if (row.getDuration().contains(dataObject.getDuration())) {
row.add(dataObject);
break;
}
}
}
}
COM: <s> sets the data for the </s>
|
funcom_train/47833253 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initializeInternalComponents() {
secseConsistencyChecker = new SeCSEConChecker();
secseEventGenerator = new SeCSEEventGen(templateStorer, fluentStorer);
addObserver(secseConsistencyChecker);
addObserver(secseEventGenerator);
secseEventGenerator.addObserver(secseConsistencyChecker);
InternalFunctionUtility.setFluentStorer(fluentStorer);
}
COM: <s> initialises internal components of the monitor </s>
|
funcom_train/44891019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int findOpeningDelimiter(IDocument document, char openingDelimiter, char closingDelimiter, int fromOffset) {
try {
char ch;
int offset = fromOffset;
int nestingLevel = 1;
while (offset > 0) {
ch = document.getChar(offset);
if (ch == closingDelimiter)
nestingLevel++;
if (ch == openingDelimiter)
nestingLevel--;
if (nestingLevel == 0)
return offset + 1;
offset--;
}
} catch (BadLocationException e) {
// do nothing. The method will return -1.
}
return -1;
}
COM: <s> answer the offset of the character after the opening delimiter </s>
|
funcom_train/7614308 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void scale(float[] pixelData, short[] chanData, int chanDataOffset) {
for (int chan = 0; chan < nColorChannels; chan++) {
chanData[chanDataOffset + chan] =
(short) ((pixelData[chan] - channelMinValues[chan]) *
channelMulipliers[chan] + 0.5f);
}
}
COM: <s> scales one pixel and puts obtained values to the chan data </s>
|
funcom_train/3813871 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Word getAssociatedWord() {
Word word = null;
SentenceHMMState state = this;
while (state != null && !(state instanceof WordState)) {
state = state.getParent();
}
if (state != null) {
WordState wordState = (WordState) state;
word = wordState.getWord();
}
return word;
}
COM: <s> returns the word associated with the particular unit </s>
|
funcom_train/11655252 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addConfigElement(ConfigElement config, Class<?> asClass) {
if (config != null) {
ConfigElement current = configSet.get(asClass);
if (current == null) {
configSet.put(asClass, cloneIfNecessary(config));
} else {
current.addConfigElement(config);
}
}
}
COM: <s> add a config element as a specific class </s>
|
funcom_train/33985378 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAccessors() {
String[] keys;
try {
keys = prefs.keys();
} catch (BackingStoreException e) {
// TODO Auto-generated catch block
e.printStackTrace();
throw new RuntimeException("could not retrieve preferences", e);
}
for (String name : keys) {
if (name.endsWith(".requestToken") || name.endsWith(".accessToken")
|| name.endsWith(".tokenSecret"))
prefs.remove(name);
}
}
COM: <s> remove all the cookies that contain accessors data </s>
|
funcom_train/34355098 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ComponentContainer createMainComponent() {
// we have two rows -- first with all the filter components,
// second with search results
GridLayout layout = new GridLayout(1, 2);
layout.addComponent(createSearchPanel());
resultView = new ServiceList();
layout.addComponent(resultView);
layout.setRowExpandRatio(0, 0.1f);
layout.setRowExpandRatio(1, 1.0f);
layout.setWidth("100%");
return layout;
}
COM: <s> creates the main components </s>
|
funcom_train/4900587 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setZoom(int zoom) {
zoomChanging = true;
mainMap.setZoom(zoom);
miniMap.setZoom(mainMap.getZoom()+4);
if(sliderReversed) {
zoomSlider.setValue(zoomSlider.getMaximum()-zoom);
} else {
zoomSlider.setValue(zoom);
}
zoomChanging = false;
}
COM: <s> set the current zoomlevel for the main map </s>
|
funcom_train/7292479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean hasNoMajorSolarTerm(int newMoon) {
int mst = majorSolarTerm(newMoon);
int nmn = newMoonNear(newMoon + SYNODIC_GAP, true);
int mstt = majorSolarTerm(nmn);
return mst == mstt;
/*
return majorSolarTerm(newMoon) ==
majorSolarTerm(newMoonNear(newMoon + SYNODIC_GAP, true));
*/
}
COM: <s> return true if the given month lacks a major solar term </s>
|
funcom_train/31937310 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void testForAdditions() {
IContributionItem item = menu.find(IWorkbenchActionConstants.MB_ADDITIONS);
if (item == null) {
WorkbenchPlugin.log("Context menu does not contain standard group for "//$NON-NLS-1$
+ "additions ("//$NON-NLS-1$
+ IWorkbenchActionConstants.MB_ADDITIONS
+ ")");//$NON-NLS-1$
}
}
COM: <s> checks for the existance of an mb additions group </s>
|
funcom_train/27829360 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveToFile(File file, byte[] content) throws IOException {
FileWriter writer = new FileWriter(file);
InputStreamReader reader = new InputStreamReader(
new ByteArrayInputStream(content));
// copy html file to selected file
char[] buffer = new char[5000];
int read = -1;
while ((read = reader.read(buffer)) > 0) {
writer.write(buffer, 0, read);
}
writer.close();
reader.close();
}
COM: <s> saves the content to file </s>
|
funcom_train/44872503 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getLabelColorPanel() {
if (labelColorPanel == null) {
labelColorLabel = new JLabel();
labelColorLabel.setText("Color ");
labelColorPanel = new JPanel();
labelColorPanel.setLayout(new BoxLayout(getLabelColorPanel(),
BoxLayout.X_AXIS));
labelColorPanel.setToolTipText("Axis label color");
labelColorPanel.add(labelColorLabel, null);
labelColorPanel.add(getLabelColorChoice(), null);
}
return labelColorPanel;
}
COM: <s> this method initializes label color panel </s>
|
funcom_train/3720898 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLongName(String longName) throws ProfileException {
String oldLongName = this.longName;
try {
vetoableChangeSupport.fireVetoableChange("longName", oldLongName, longName);
} catch (Exception e) {
throw new ProfileException(null, e);
}
this.longName = longName;
propertyChangeSupport.firePropertyChange("longName", oldLongName, longName);
}
COM: <s> setter for property long name </s>
|
funcom_train/50485631 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setColumnDefinitions(Column[] cols) {
columns.setColumns(cols);
for (int i=0; i<columns.getColumnCount(); i++) {
columns.getColumn(i).addColumnListener(new ColumnAdapter() {
public void sorterChanged(ColumnEvent e) {
fireQueryEvent("order");
}
});
}
fireQueryEvent("column");
}
COM: <s> set columns from given array of column </s>
|
funcom_train/927531 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(ASDNGraph graph) {
m_Graph = graph;
m_sTxts[0][1] = Double.toString(getLeadtime());
m_sTxts[1][1] = NumberUtil.roundAndString(getTotalInventory(), 0);
m_sTxts[2][1] = NumberUtil.roundAndString(getTotalInvValue(), 0);
m_sTxts[3][1] = getCapacityConstraintNode();
m_Table.repaint();
}
COM: <s> update total values </s>
|
funcom_train/41099719 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ServiceLine read(String id) throws DataException {
//check to see if the object is in cache, if it is just return it
//establish a connection from the pool, then pass that connection along with the string id to the next method
//catch any exceptions you may have
//return the serviceLine
//RELEASE THE CONNECTION!!
}
COM: <s> reads an existing service line from the database </s>
|
funcom_train/46376222 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private class ContentRepoNodeURIFactory implements NodeURIFactory {
public String getURI(ContentNode node) {
String assetPath = node.getPath();
// The value returned from getPath() starts with a beginning
// slash, so strip it if so
if (assetPath.startsWith("/") == true) {
assetPath = assetPath.substring(1);
}
return "wlcontent://" + assetPath;
}
}
COM: <s> an implementation of the node urifactory for the system and users </s>
|
funcom_train/33421976 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GenericValue makeValue(String entityName) {
ModelEntity entity = this.getModelEntity(entityName);
if (entity == null) {
throw new IllegalArgumentException("[GenericDelegator.makeValue] could not find entity for entityName: " + entityName);
}
GenericValue value = GenericValue.create(entity);
value.setDelegator(this);
return value;
}
COM: <s> creates a entity in the form of a generic value without persisting it </s>
|
funcom_train/28755437 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDatetransfered(java.util.Date newVal) {
if ((newVal != null && this.datetransfered != null && (newVal.compareTo(this.datetransfered) == 0)) ||
(newVal == null && this.datetransfered == null && datetransfered_is_initialized)) {
return;
}
this.datetransfered = newVal;
datetransfered_is_modified = true;
datetransfered_is_initialized = true;
}
COM: <s> setter method for datetransfered </s>
|
funcom_train/2903656 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setLoadFactor(){
try{
BufferedReader fr = new BufferedReader(new FileReader(loadAvg));
String l = fr.readLine();
fr.close();
StringTokenizer st = new StringTokenizer(l);
String lf = st.nextToken();
float ld = Float.parseFloat(lf);
int v = (int)(ld*100);
load.setMaximum(100);
load.setMinimum(0);
load.setValue(v);
load.revalidate();
load.repaint();
load.setToolTipText("Current load: "+ld+" per minute");
}
catch(Exception e){
sys.setToolTipText("Current load: Error reading data");
}
}
COM: <s> set the current load factor of the system </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.