__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/45114593 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int regDelete(String keyname, String valuename) throws Exception {
Map<?, ?> result = null;
if (valuename == null) {
result = runRemoteScript(commandCreate("RegDelete", true, keyname));
} else {
result = runRemoteScript(commandCreate("RegDelete", true, keyname, valuename));
}
return Integer.parseInt(result.get(STDOUT).toString());
}
COM: <s> deletes a key or value from the registry </s>
|
funcom_train/22276357 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean removeByKey(K key, V value) {
boolean wasRemovedByKey = false;
if(map.containsKey(key)) {
Set<V> s = map.get(key);
if(s.remove(value) ){
wasRemovedByKey = true;
}
if(s.isEmpty()) {
map.remove(key);
}
}
return wasRemovedByKey;
}
COM: <s> removes key value entry from map </s>
|
funcom_train/3363047 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Spring getWidth() {
if (width == null) {
if (horizontalHistory.contains(EAST)) {
width = difference(east, getX());
} else if (horizontalHistory.contains(HORIZONTAL_CENTER)) {
width = scale(difference(horizontalCenter, getX()), 2f);
}
}
return width;
}
COM: <s> returns the value of the code width code property </s>
|
funcom_train/18149583 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addParameter(Parameter parameter) {
// create the association set if it doesn't exist already
if(_parameter == null) _parameter = new AssociationSetImpl<Parameter>();
// add the association to the association set
getParameter().add(parameter);
// make the inverse link
parameter.setParameterList(this);
}
COM: <s> adds an association parameter </s>
|
funcom_train/9965371 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getSourceDirectoryList() {
// Get names from sourceDirectories
List result = new ArrayList();
for( Iterator it=sourceDirectories.iterator(); it.hasNext();) {
result.add( it.next());
}
// Get names from sourceFilesMap
for( Iterator it=sourceFilesMap.keySet().iterator(); it.hasNext();) {
result.add(it.next());
}
// Return combined names
return result;
}
COM: <s> returns a list with string for all source directories </s>
|
funcom_train/964854 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setAlignments(String encodedAlignments, boolean horizontalThenVertical) {
StringTokenizer tokenizer = new StringTokenizer(encodedAlignments, " ,");
Alignment first = decodeAlignment(tokenizer.nextToken());
Alignment second = decodeAlignment(tokenizer.nextToken());
hAlign = horizontalThenVertical ? first : second;
vAlign = horizontalThenVertical ? second : first;
ensureValidOrientations(hAlign, vAlign);
}
COM: <s> decodes a string description for the horizontal and vertical alignment </s>
|
funcom_train/41675524 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getSwingAppDirectoryPath() {
String domainPackageCode = domainConfig.getPackageCode();
String domainSwingAppPackageCode = domainPackageCode + ".swing.app";
String domainSwingAppPackageCodeWithSlash = textHandler
.replaceDotWithSlash(domainSwingAppPackageCode);
String domainSwingAppDirectoryPath = sourceDirectoryPath + SEPARATOR
+ domainSwingAppPackageCodeWithSlash;
return domainSwingAppDirectoryPath;
}
COM: <s> gets swing application directory path </s>
|
funcom_train/51130197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PlayerStats getStats(LeagueElement leagueElement) {
for (int i = 0; i < playerStats.size(); i++) {
PlayerStats tmp = playerStats.get(i);
if (leagueElement.equals(tmp.getOwner())) {
return tmp;
}
}
this.createStats(leagueElement);
return getStats(leagueElement);
// return null;
}
COM: <s> return stats for given league element </s>
|
funcom_train/7660790 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConvertSaturate() {
assertEquals(Long.MAX_VALUE,
TimeUnit.NANOSECONDS.convert(Long.MAX_VALUE / 2,
TimeUnit.SECONDS));
assertEquals(Long.MIN_VALUE,
TimeUnit.NANOSECONDS.convert(-Long.MAX_VALUE / 4,
TimeUnit.SECONDS));
}
COM: <s> convert saturates positive too large values to long </s>
|
funcom_train/3491345 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean forEachEntry(TObjectFloatProcedure procedure) {
Object[] keys = _set;
float[] values = _values;
for (int i = keys.length; i-- > 0;) {
if (keys[i] != null
&& keys[i] != REMOVED
&& ! procedure.execute(keys[i],values[i])) {
return false;
}
}
return true;
}
COM: <s> executes tt procedure tt for each key value entry in the </s>
|
funcom_train/8089836 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Vector testWithTestValues(Estimator est, Vector test) {
Vector results = new Vector();
for (int i = 0; i < test.size(); i++) {
double testValue = ((Double)(test.elementAt(i))).doubleValue();
double prob = est.getProbability(testValue);
Double p = new Double(prob);
results.add(p);
}
return results;
}
COM: <s> test with test values </s>
|
funcom_train/49757383 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeRoomListener(UPBRoomListenerI theListener, UPBRoomI forRoom) {
synchronized(roomListenerList) {
for (QualifiedRoomListener roomListener: roomListenerList) {
if (roomListener.theListener != theListener) continue;
if (roomListener.theRoom != forRoom) continue;
// Remove Listener
roomListenerList.remove(roomListener);
roomListener.releaseResources();
return;
}
}
}
COM: <s> remove a previously added room listener for a passed room </s>
|
funcom_train/44156584 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int countVisibleFrames() {
if (m_desktop == null || m_desktop.getAllFrames() == null
|| m_desktop.getAllFrames().length < 1) {
return (0);
}
JInternalFrame[] frames = m_desktop.getAllFrames();
int count = 0;
for (int i = 0; i < frames.length; i++) {
if (frames[i].isVisible()) {
count++;
}
}
return (count);
}
COM: <s> counts only visible frames </s>
|
funcom_train/7874380 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public User showUser(String id) throws TwitterException {
assert (id != null);
String url = String.format("http://twitter.com/users/show/%s.json", id);
String response = getTwitterHttpManager().get(url);
return User.newFromJsonString(response);
}
COM: <s> returns extended information of a given user specified by id or screen </s>
|
funcom_train/5734141 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBitDepth(int bitDepth) {
if (bitDepth != 1 && bitDepth != 2 && bitDepth != 4 &&
bitDepth != 8 && bitDepth != 16) {
throw new IllegalArgumentException();
}
this.bitDepth = bitDepth;
bitDepthSet = true;
}
COM: <s> sets the desired bit depth for a grayscale image </s>
|
funcom_train/18551622 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent pActionEvent) {
Object source = pActionEvent.getSource();
if (source == gSearchButton) {
searchButtonAction();
} else if (source == gInspectWSILFileItem) {
inspectWSDLAction();
} else if (source == gAddToResourceItem) {
addOperationToResources();
} else if (source == gTestServiceItem) {
testService();
}
}
COM: <s> listens for an action event finds the source and calls the appropriate method </s>
|
funcom_train/1711009 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeToStream(ByteArrayOutputStream bos, Object obj, String string2) throws IOException{
int start = bos.size();
ObjectOutput os=new ObjectOutputStream(bos);
os.writeObject(obj);
int end = bos.size();
if(debugStreams)
System.out.println(string2+" = "+((end-start)));
os.close();
}
COM: <s> generic method to serilized an object to an output stream </s>
|
funcom_train/42795635 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addCommands(PDFPage page, Matrix extra) {
synchronized (commands) {
addPush();
if (extra != null) {
addXform(extra);
}
//addXform(page.getTransform());
commands.addAll(page.getCommands());
addPop();
}
// notify any outstanding images
updateImages();
}
COM: <s> add a collection of commands to the page list </s>
|
funcom_train/39819163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Tuplizer getTuplizer(EntityMode entityMode) {
Tuplizer rtn = null;
if ( EntityMode.POJO == entityMode ) {
rtn = pojoTuplizer;
}
else if ( EntityMode.DOM4J == entityMode ) {
rtn = dom4jTuplizer;
}
else if ( EntityMode.MAP == entityMode ) {
rtn = dynamicMapTuplizer;
}
if ( rtn == null ) {
throw new HibernateException( "No tuplizer found for entity-mode [" + entityMode + "]");
}
return rtn;
}
COM: <s> locate the contained tuplizer responsible for the given entity mode </s>
|
funcom_train/33142126 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getCloseButton() {
if (closeButton == null) {
closeButton = new JButton();
closeButton.setText("Close");
closeButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
setVisible(false);
}
});
}
return closeButton;
}
COM: <s> this method initializes close button </s>
|
funcom_train/35281070 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FloatBuffer fillFloatBuffer(FloatBuffer fb, boolean columnMajor) {
// if (columnMajor){
// fb.put(m00).put(m10).put(m20);
// fb.put(m01).put(m11).put(m21);
// fb.put(m02).put(m12).put(m22);
// }else{
// fb.put(m00).put(m01).put(m02);
// fb.put(m10).put(m11).put(m12);
// fb.put(m20).put(m21).put(m22);
// }
TempVars vars = TempVars.get();
fillFloatArray(vars.matrixWrite, columnMajor);
fb.put(vars.matrixWrite, 0, 9);
vars.release();
return fb;
}
COM: <s> code fill float buffer code fills a float buffer object with the matrix </s>
|
funcom_train/18367472 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean readElement(IConfigurationElement element) {
if (element.getName().equals(TAG)) {
try {
ServiceDescriptionDescriptor desc = new ServiceDescriptionDescriptor(element);
registry.addServiceDescriptionDescriptor(desc);
} catch (CoreException e) {
// log an error since its not safe to open a dialog here
WorkbenchPlugin.log("Unable to create working set descriptor.",e.getStatus());
}
return true;
}
return false;
}
COM: <s> overrides method in registry reader </s>
|
funcom_train/4078233 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void renderScreenContent(Context velocityContext) throws Exception {
if (logger.isDebugEnabled()) {
logger.debug("Rendering screen content template [" + getUrl()+ "]");
}
StringWriter sw = new StringWriter();
Template screenContentTemplate = getTemplate(getUrl());
screenContentTemplate.merge(velocityContext, sw);
// Put rendered content into Velocity context.
velocityContext.put(this.screenContentKey, sw.toString());
}
COM: <s> the resulting context contains any mappings from render plus screen </s>
|
funcom_train/9880754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void onElementSizeChanged() {
GDMElementSizeDialog dialog = new GDMElementSizeDialog(mainframe, elementSize);
if (dialog.showModal() == JOptionPane.OK_OPTION) {
Dimension size = dialog.getElementSize();
onElementSizeChanged(size.width, size.height);
}
}
COM: <s> sets the user specified spot size </s>
|
funcom_train/7655232 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List valueOfExtendedKeyUsage() throws IOException {
Extension extn = getExtensionByOID("2.5.29.37"); //$NON-NLS-1$
if (extn == null) {
return null;
}
return ((ExtendedKeyUsage)
extn.getDecodedExtensionValue()).getExtendedKeyUsage();
}
COM: <s> returns the value of extended key usage extension oid 2 </s>
|
funcom_train/49469776 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPort(int vulnId, int netPortId) throws Exception {
if (isLinkedToPort(vulnId, netPortId))
return;
Db db = getDb();
try {
db.enter();
st_netport.setInt(1, netPortId);
st_netport.setInt(2, vulnId);
int res = db.executeUpdate(st_netport);
if (res != 1)
throw new Exception("Failed ("+res+") to link vulnerability ("+vulnId+") to port ("+netPortId+")");
}
finally {
db.exit();
}
}
COM: <s> links a vulnerability to a port protocol </s>
|
funcom_train/5341086 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String value;
switch(_TYPE) {
case SCHEMA: value = S_SCHEMA; break;
case FIELD: value = S_FIELD + ", " + _SCHEMA + ", " + _VALUE; break;
case PROPERTY: value = S_PROPERTY + ", " + _VALUE; break;
default:
throw new IllegalStateException("invalid type: " + _TYPE);
}
return value + " | " + _minimized;
}
COM: <s> writes the selector out in the specified format </s>
|
funcom_train/25707252 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getMorePanel() {
if (morePanel == null) {
morePanel = new JPanel(new BorderLayout());
morePanel.setBorder(new EmptyBorder(10, 10, 10, 10));
new TextComponentClipboardMenu(moreTextArea, language);
moreTextArea.setEditable(false);
moreTextArea.setColumns(10);
moreTextArea.setMargin(new Insets(0, 3, 0, 3));
moreTextArea.setRows(10);
morePanel.add(moreScrollPane, BorderLayout.CENTER);
}
return morePanel;
}
COM: <s> this method creates the panel that contains the additional details </s>
|
funcom_train/4494882 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void printInvocation(PrintWriter out, ExpressionPrerequisite prereq,List<String> paramRefs, boolean includeExplanation, boolean increaseLevel) {
out.print(this.expressionPrereqMethodRefs.get(prereq));
out.print("(");
boolean f = true;
for (String param : paramRefs) {
if (f)
f = false;
else
out.print(',');
out.print(param);
}
// add reference to explanation
if (includeExplanation) {
if (f)
f = false;
else
out.print(',');
out.print(this.getVarName4DerivationController());
if (increaseLevel) {
out.print(".increaseDepth()");
}
}
out.print(")");
}
COM: <s> print the code used to invoke the method representing a query </s>
|
funcom_train/37857975 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SVNInfo doInfo(File path, SVNRevision revision) throws SVNException {
final SVNInfo[] result = new SVNInfo[1];
doInfo(path, SVNRevision.UNDEFINED, revision, SVNDepth.EMPTY, null, new ISVNInfoHandler() {
public void handleInfo(SVNInfo info) {
if (result[0] == null) {
result[0] = info;
}
}
});
return result[0];
}
COM: <s> collects and returns information on a single working copy item </s>
|
funcom_train/17053935 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startMIDlet() {
String[] connections = PushRegistry.listConnections(true);
if ((connections == null) || (connections.length == 0)) {
// Foi iniciado pelo usuário
} else {
//Foi iniciado pelo push registry
Output.println("Iniciado pelo push registry!");
}
Controller.startApplication(this);
switchDisplayable(null, getListaInicial());
// write post-action user code here
}
COM: <s> performs an action assigned to the mobile device midlet started point </s>
|
funcom_train/495109 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Group generateLabel(String labelValue, float x, float y, float z) {
Text2D text2D = new Text2D(labelValue, new Color3f(0.0f, 0.0f, 0.0f), "courier", 12, Font.PLAIN);
BranchGroup bg = new BranchGroup();
return generateLabel(x, y, z, bg, text2D);
}
COM: <s> makes a text 2 d label for use in this application </s>
|
funcom_train/43245249 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetECOneName() {
System.out.println("getECOneName");
EmergencyContactDG3Object instance = new EmergencyContactDG3Object();
String expResult = "";
String result = instance.getECOneName();
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 econe name method of class org </s>
|
funcom_train/11704302 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File findStandardFile(String stdFileName) {
String fileName = stdFileName.replace('\\', File.separatorChar)
.replace('/', File.separatorChar);
File file = new File(_rootDir, fileName);
File foundFile = (_allFiles.contains(file)) ? file : null;
return foundFile;
}
COM: <s> looks for a given standard package file </s>
|
funcom_train/31223397 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean accept(Object someClassifiable) {
boolean accepted;
boolean elementForcedInThisCategory = false;
if (someClassifiable instanceof Classifiable) {
elementForcedInThisCategory = ((Classifiable) someClassifiable).getForcedCategory(classification) == this;
}
if (!elementForcedInThisCategory) {
accepted = filter.accept(someClassifiable);
} else {
accepted = elementForcedInThisCategory;
}
return accepted;
}
COM: <s> check if an object is classified in this category </s>
|
funcom_train/46519121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CharacterState lookupCharacterStateBySymbol(String symbol){
if (symbol == null){
return null;
}
for (CharacterState cs : getCharacterStates()){
if (symbol.equals(cs.getSymbol())){
return cs;
}
}
throw new Error("Symbol "+symbol+" not allowed in predefined state set");
}
COM: <s> makes working with predefined sets e </s>
|
funcom_train/18793597 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected BOperator bOp(String zop) {
BOperator bop = ops_.get(zop);
// generate a log message
String zname = zop;
if (zop.length() == 1)
zname = "\\u" + Integer.toHexString((int) zop.charAt(0));
sLogger.fine("bOp(" + zname + ") returns " + bop);
return bop;
}
COM: <s> get the b operator that corresponds to a z operator or null </s>
|
funcom_train/48406346 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addMemberEndPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Association_memberEnd_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Association_memberEnd_feature", "_UI_Association_type"),
SpemxtcompletePackage.eINSTANCE.getAssociation_MemberEnd(),
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the member end feature </s>
|
funcom_train/5406403 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void closeClientSession(String connectionManagerDomain, String streamID) {
Map<String, ClientSession> sessions = sessionsByManager.get(connectionManagerDomain);
if (sessions != null) {
Session session = sessions.remove(streamID);
if (session != null) {
// Close the session
session.getConnection().close();
}
}
}
COM: <s> closes an existing client session that was established through a connection manager </s>
|
funcom_train/18367607 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getNumWinners() {
int winners = 0;
if(results != null)
for(Iterator i = results.iterator(); i.hasNext();) {
Integer temp = (Integer)i.next();
if(temp.intValue() >= initial_balance)
winners++;
}
return winners;
}
COM: <s> gets the number of winning results agents that had more money than </s>
|
funcom_train/3304883 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HashMap parse() throws com.sun.star.uno.Exception {
logger.debug ("parsing SXW-Form");
formdata = new HashMap();
logMsg = new StringBuffer();
Object formComponent = docHelper.getFormComponentTreeRoot();
parse(formComponent);
logger.debug(logMsg.toString());
logger.debug ("formdata with "+formdata.size()+" entries was build");
return formdata;
}
COM: <s> parses the given form and puts all data into the returned hash map </s>
|
funcom_train/11378701 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int runStreamJob() throws IOException {
createInput();
boolean mayExit = false;
// During tests, the default Configuration will use a local mapred
// So don't specify -config or -cluster
job = new StreamJob(genArgs(), mayExit);
return job.go();
}
COM: <s> runs a streaming job with the given arguments </s>
|
funcom_train/3924118 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeTransform( Client c, Transform t ) throws Exception {
// Notify all clients of deletion.
removeTransformFromScene( t );
// update the database
VRObject[] children = t.getChildren();
for ( int j = 0; j < children.length; j++ ) {
remove( c, children[ j ] );
}
remove( c, t );
}
COM: <s> remove a transform from the database </s>
|
funcom_train/2027416 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addNode(SessionNode node) {
Checker.nullArg(node, "session node");
if (hasNode(node) || hasRemovedNode(node)) {
throw new IllegalArgumentException("Node '" + node.getName()
+ "' is already registered");
}
this.nodes.add(node);
}
COM: <s> registers the specified node with this manager </s>
|
funcom_train/25972421 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Archetype getArchetype(Class <?extends Archetype> archetype) throws Exception {
@SuppressWarnings("rawtypes")
Class[] args = new Class[] {
float.class, float.class, float.class,
float.class, float.class, float.class,
float.class
};
return archetype.getConstructor(args)
.newInstance(
config.getEvasionModifier(archetype),
config.getMeleeAccuracyModifier(archetype),
config.getRangedAccuracyModifier(archetype),
config.getMeleeDamageModifier(archetype),
config.getRangedDamageModifier(archetype),
config.getWrestlingDamageModifier(archetype),
config.getBlockPowerModifier(archetype)
);
}
COM: <s> retrieves a new instance of the given archetype class </s>
|
funcom_train/33428345 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearLayer() {
for(q = 0; q < MAX_SPRITES; q++)
if(spriteArr[q] != null) {
spriteArr[q].resetModifiers();
spriteArr[q] = null;
}
for(q = 0; q < MAX_EMITTERS; q++)
emitterArr[q] = null;
for(q = 0; q < MAX_TEXTS; q++)
textArr[q] = null;
}
COM: <s> removes everything from the layer </s>
|
funcom_train/41385630 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBotonModificar() {
if (botonModificar == null) {
botonModificar = new JButton();
botonModificar.setBounds(new Rectangle(35, 120, 85, 30));
botonModificar.setFont(new Font("Verdana", Font.PLAIN, 10));
botonModificar.setText("Modificar");
botonModificar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
listener.actionPerfomred(e);
}
});
}
return botonModificar;
}
COM: <s> this method initializes boton modificar </s>
|
funcom_train/4461113 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double interval(double p1, double t1, double t2, double p2, double i) {
double i2 = i * i;
double i3 = i2 * i;
double h1 = 2 * i3 - 3 * i2 + 1;
double h2 = -2 * i3 + 3 * i2;
double h3 = i3 - 2 * i2 + i;
double h4 = i3 - i2;
return h1 * p1 + h2 * p2 + h3 * t1 + h4 * t2;
}
COM: <s> interpolates between the starting point p1 and end point p2 at i </s>
|
funcom_train/27846008 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object object) {
if (object == null)
return false;
if (this == object)
return true;
if (object instanceof RoleCredential) {
PasswordCredential otherobject = (PasswordCredential) object;
if (getPassword().equals(otherobject.getPassword()) &&
getRealm().equals(otherobject.getRealm()) ) return true;
}
return false;
}
COM: <s> compares the specified object with this password credential for equality </s>
|
funcom_train/5395540 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetLongValue() {
System.out.println("getLongValue");
DBPLong instance = new DBPLong();
long expResult = 0L;
long result = instance.getLongValue();
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 long value method of class org </s>
|
funcom_train/32750328 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public boolean formsRing( final List<AcceleratorSeq> sequences ) {
final int count = sequences.size();
// test if we have more than one sequence
if ( count < 2 ) return false;
// test if each sequence can precede the one that follows
AcceleratorSeq previousSequence = sequences.get( count - 1 );
for ( int index = 0 ; index < count ; index++ ) {
final AcceleratorSeq sequence = sequences.get( index );
if ( !previousSequence.canPrecede( sequence ) ) return false;
previousSequence = sequence;
}
return true;
}
COM: <s> determing if the ordered list of sequences forms a closed loop </s>
|
funcom_train/41768122 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String openDialog() throws Exception {
String p = null;
int r = chooser.showOpenDialog(frame);
if (r == 0) {
try {
p = chooser.getSelectedFile().getPath();
}
catch (Exception ie) {
throw new Exception("Error in determining path");
}
}
return p;
}
COM: <s> pops up an open file file chooser dialog </s>
|
funcom_train/4014189 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void copyLabelMap(HashMap<QuestionDef,List<Label>> labelMap){
Iterator<Entry<QuestionDef,List<Label>>> iterator = labelMap.entrySet().iterator();
while(iterator.hasNext()){
Entry<QuestionDef,List<Label>> entry = iterator.next();
this.labelMap.put(entry.getKey(), entry.getValue());
}
}
COM: <s> copies from a given label map to our class level one </s>
|
funcom_train/21954500 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Color getBorderSelectionColor() {
MainPanel mp = Pooka.getMainPanel();
if (mp != null) {
FolderPanel fp = mp.getFolderPanel();
if (fp != null) {
javax.swing.plaf.metal.MetalTheme currentTheme = fp .getCurrentTheme();
if (currentTheme != null) {
return currentTheme.getFocusColor();
}
}
}
return super.getBorderSelectionColor();
}
COM: <s> returns the color the border is drawn </s>
|
funcom_train/8607695 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void startDuel(Player requester, Player responder) {
PacketSendUtility.sendPacket(requester, SM_DUEL.SM_DUEL_STARTED(responder.getObjectId()));
PacketSendUtility.sendPacket(responder, SM_DUEL.SM_DUEL_STARTED(requester.getObjectId()));
createDuel(requester.getObjectId(), responder.getObjectId());
}
COM: <s> starts the duel </s>
|
funcom_train/21755433 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String escapeXml(String str) {
if (Utils.isEmpty(str))
return str;
StringBuffer sb = new StringBuffer();
int len = str.length();
char c;
for (int i = 0; i < len; i++) {
c = str.charAt(i);
switch (c) {
case '&':
sb.append("&");
break;
case '<':
sb.append("<");
break;
case '>':
sb.append(">");
break;
case '"':
sb.append(""");
break;
// XML actually defines ' as entity for the apostrophe but we
// user rather the numerical reference to avoid XHTML 1.0 validation
// problems
case '\'':
sb.append("'");
break;
default:
sb.append(c);
break;
}
}
return sb.toString();
}
COM: <s> escapes base xml entities as specified a </s>
|
funcom_train/24112296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String format(final int value, final int length) {
final StringBuilder builder = new StringBuilder(Integer.toString(value));
while (builder.length() < length) {
builder.insert(0, "0"); //$NON-NLS-1$
}
return builder.toString();
}
COM: <s> formats a given integer value </s>
|
funcom_train/4874518 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initArrays() {
data = new int[W*H];
magnitude = new int[W*H];
xConv = new float[W*H];
yConv = new float[W*H];
xGradient = new float[W*H];
yGradient = new float[W*H];
}
COM: <s> initialize all internal arrays </s>
|
funcom_train/13187732 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RegularTimePeriod previous() {
RegularTimePeriod result = null;
if (this.millisecond != FIRST_MILLISECOND_IN_SECOND) {
result = new Millisecond(this.millisecond - 1, this.second);
}
else {
Second previous = (Second) this.second.previous();
if (previous != null) {
result = new Millisecond(LAST_MILLISECOND_IN_SECOND, previous);
}
}
return result;
}
COM: <s> returns the millisecond preceding this one </s>
|
funcom_train/3935306 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void deleteItemInIndex() throws IOException, VException {
String lUniqueID = UniqueID.getStringOf(getItemType(), getID());
RelationsIndexer lIndexer = new RelationsIndexer(DBHandler.getInstance().getDBSettings().getCatalog());
lIndexer.deleteItemInIndex(lUniqueID);
}
COM: <s> deletes the items search term in the search index </s>
|
funcom_train/3711711 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setAnnotationsIntoSenseRegions () {
int size = annotations.size() + 1;
Rectangle2D[] regions = new Rectangle2D[size];
regions[0] = ID_annotation;
for (int i = 0; i < annotations.size(); i++) {
regions[i+1] = (Rectangle2D) annotations.get(i);
}
setSensitiveRegions (regions);
}
COM: <s> sets all annotations into sensitive regions </s>
|
funcom_train/31872072 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public class FrameTOLY extends FrameT {
public String getLongName () { return "Original lyricist frame"; }
public FrameTOLY (ID3V2Frame frm) {
super (frm);
}
public FrameTOLY (ID3V2Frame frm, DataSource ds)
throws SeekPastEndException {
super (frm, ds);
}
public String toString () {
return getLongName () + " Encoding: "+encoding+"\nOriginal lyricist : "
+ text;
}
}
COM: <s> original lyricist frame </s>
|
funcom_train/45541707 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JSCSourceViewer createJSCSourceViewer(Composite parent, IVerticalRuler verticalRuler, IOverviewRuler overviewRuler, boolean isOverviewRulerVisible, int styles, IPreferenceStore store) {
return new JSCSourceViewer(parent, verticalRuler, getOverviewRuler(), isOverviewRulerVisible(), styles, store);
}
COM: <s> creates the jsc source viewer to be used by this editor </s>
|
funcom_train/51605064 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JList getJListEvents() {
if (jListEvents == null) {
jListEvents = new JList();
jListEvents.setModel(new EventsListModel(plantation.getEvents()));
jListEvents.setCellRenderer(new EventsListCellRenderer());
jListEvents
.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
public void valueChanged(javax.swing.event.ListSelectionEvent e) {
eventShow();
}
});
}
return jListEvents;
}
COM: <s> this method initializes j list events </s>
|
funcom_train/3122370 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object matchCol(Map colData) {
Object matchedColHeader = partialMatchCol(colData);
if (matchedColHeader != null) {
if (getRows().size() == colData.size()) {
return matchedColHeader;
}
else {
return null;
}
}
return null;
} // of method
COM: <s> returns the header of a column that matches the given collection of data </s>
|
funcom_train/38529401 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean overWriteExistsConfirm(final File file) {
final boolean writeConfirm = file.exists() ? JOptionPane.YES_OPTION == JOptionPane
.showConfirmDialog(null, "Replace the existing file? \n"
+ file.getName(), "Save " + file.getName(),
JOptionPane.YES_NO_OPTION)
: true;
if (writeConfirm) {
// we've confirmed overwrite with the user.
file.delete();
}
return writeConfirm;
}
COM: <s> check if a file already exist and display dialog to confirm overwritting </s>
|
funcom_train/21911457 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void closeContext() {
// Do nothing if there is no opened connection
if (context == null) {
return;
}
// Close our opened connection
try {
if (debug >= 1) {
log("Closing directory context");
}
context.close();
}
catch (NamingException e) {
log("jndiRealm.close", e);
}
// this.context = null;
}
COM: <s> close any open connection to the directory server for this realm </s>
|
funcom_train/2888469 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element getElementByTagNameAttrName(String tagName, String attrValue) {
NodeList list = doc.getElementsByTagName(tagName);
for (int i=0; i<list.getLength(); i++) {
Element element = (Element)list.item(i);
String elementName = element.getTagName();
String value = element.getAttribute("name");
if ((elementName.equals(tagName) && (value.equals(attrValue)))) {
return element;
}
}
return null;
}
COM: <s> returns an element with tag name and whose attribute name attr value </s>
|
funcom_train/21609822 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void reset() {
state = STATE_START;
ais.clear();
tok = new StreamTokenizer(ais);
tok.resetSyntax();
tok.wordChars((char)0, (char)255);
tok.whitespaceChars('\u0000', '\u0020');
tok.eolIsSignificant(true);
request = null;
url = null;
header = null;
httpver = 0;
}
COM: <s> reset the internal state of the packet reader </s>
|
funcom_train/37447802 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Cookie getCookie(final String name) {
CDebug.checkParameterNotEmpty(name, "name");
final Cookie [] cookies = getRequest().getCookies();
if (cookies != null) {
for (int i = 0; i < cookies.length; ++i) {
if (cookies[i].getName().equals(name)) {
return cookies[i];
}
}
}
return null;
}
COM: <s> gets the cookie identified by the supplied name </s>
|
funcom_train/26455094 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setScope(String value) {
if (value != null) {
if (value.equalsIgnoreCase(ServletCacheAdministrator.SESSION_SCOPE_NAME)) {
cacheScope = PageContext.SESSION_SCOPE;
} else if (value.equalsIgnoreCase(ServletCacheAdministrator.APPLICATION_SCOPE_NAME)) {
cacheScope = PageContext.APPLICATION_SCOPE;
}
}
}
COM: <s> set the scope of this flush </s>
|
funcom_train/1722600 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTravelbugs(String cacheId, List<GeocacheDetails.Travelbug> travelbugs) {
mSqlite.execSQL(DatabaseConstants.SQL_DELETE_CACHE_TRAVELBUGS, cacheId);
for (GeocacheDetails.Travelbug tb : travelbugs) {
mSqlite.execSQL(DatabaseConstants.SQL_REPLACE_TRAVELBUG,
tb.mId, cacheId, tb.mRef, tb.mName);
}
}
COM: <s> replaces the previous list of travelbugs for the geocache with this one </s>
|
funcom_train/46379044 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void textFieldsUpdated() {
appName = appNameTextField.getText();
command = commandTextField.getText();
// The OK button can only be abled if both text fields are not null
boolean enabled = appName.equals("") == false && command.equals("") == false;
okButton.setEnabled(enabled);
}
COM: <s> handles when changes are made to the text fields enables buttons if </s>
|
funcom_train/29693725 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showOptions() {
if (client.game.getPhase() == IGame.PHASE_LOUNGE) {
getGameOptionsDialog().setEditable(true);
} else {
getGameOptionsDialog().setEditable(false);
}
// Display the game options dialog.
getGameOptionsDialog().update(client.game.getOptions());
getGameOptionsDialog().setVisible(true);
}
COM: <s> called when the user selects the view game options menu item </s>
|
funcom_train/49318083 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void _updateImage() {
if (_mainImageDisplay == null) {
return;
}
// try to save time by getting a prescaled thumbnail image
if (_pannerImage == null) {
_pannerImage = _getPannerImage();
}
ImageProcessor ip = _imageDisplay.getImageProcessor();
ip.setSourceImage(_pannerImage, _mainImageDisplay.getImageProcessor());
ip.update();
_imageDisplay.updateImage();
}
COM: <s> called when the image has changed to update the display </s>
|
funcom_train/47806798 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toHTML(String sql) {
String result="<TABLE>";
try{
ResultSet r=sqlreq(sql);
Vector<String> cols=getColumnNames(sql);
result+="<TR>";
for(int n=0;n<cols.size();n++)
result+="<TD>"+cols.get(n).replaceAll("_"," ")+"</TD>";
result+="</TR>";
while(r.next()){
result+="<TR>";
for(int n=0;n<cols.size();n++)
result+="<TD>"+r.getString(n+1).replaceAll("_"," ")+"</TD>";
result+="</TR>";
}
r.close();
}catch(Exception e){e.printStackTrace();}
result+="</TABLE>";
return result;
}
COM: <s> create an html table for the result of the given sql query </s>
|
funcom_train/30175243 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File getOutputFile(long sequence) {
// return new File(path+String.valueOf(sequence));
int idx = path.lastIndexOf(".");
String path2 = path.substring(0, idx);
String ext = path.substring(idx + 1);
return new File(path2 + "_part" + String.valueOf(sequence) + "." + ext);
}
COM: <s> this procedure allows to get an output file </s>
|
funcom_train/34039443 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addWord(FixedI tome, String name, Rectangle bbox) {
tome.appendChild(new FixedLeafOCR(name,null, null, full_/*fullpage_*/, bbox));
//new FixedLeafOCR(name,null, tome, this, bbox); -- have to use above so set ibbox
//System.out.println(name+" "+bbox.x+","+bbox.y);
}
COM: <s> for rules and images </s>
|
funcom_train/40451483 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private CodeIssueData makeCodeIssueData(String tool, String issueType, IssueTypeCounter counter) {
CodeIssueData issueData = new CodeIssueData();
issueData.setTool(tool);
issueData.setIssueType(issueType);
issueData.setNumIssues(counter.getCount(issueType));
return issueData;
}
COM: <s> creates a returns a code issue data instance </s>
|
funcom_train/3157239 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRasters(final RasterDataNode[] rasters) {
if (_rasters.length == 1) {
_rasters[0] = rasters[0];
} else if (_rasters.length == 3) {
_rasters[0] = rasters[0];
_rasters[1] = rasters[1];
_rasters[2] = rasters[2];
}
}
COM: <s> sets the rasters of this product scene view </s>
|
funcom_train/18753332 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Node loadAttributes() {
this.attributesNode = new AttributeSetNode(this.emsBean);
;
this.attributeNodeMap.clear();
for (EmsAttribute attribute : this.emsBean.getAttributes()) {
attributeNodeMap.put(attribute.getName(), attribute);
}
return this.attributesNode;
}
COM: <s> loads the attribute nodes that are children of this mbean </s>
|
funcom_train/39973649 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getCircumference() {
// wikipedia solution:
// return (float) (MathUtils.PI * (3 * (radius.x + radius.y) - Math
// .sqrt((3 * radius.x + radius.y) * (radius.x + 3 * radius.y))));
return (float) Math.sqrt(0.5 * radius.magSquared()) * MathUtils.TWO_PI;
}
COM: <s> computes the approximate circumference of the ellipse using this </s>
|
funcom_train/50156255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void errorMessage(String msg) {
prtln("Error: " + msg);
Document doc = harvestLogWriter.logEntry(
harvester.getHarvestUid(),
harvester.getStartTime(),
harvester.getEndTime(),
harvester.getNumRecordsHarvested(),
harvester.getNumResumptionTokensIssued(),
HarvestLogWriter.COMPLETED_SERIOUS_ERROR,
harvester.getHarvestedRecordsDir(),
null,
null,
null,
null,
msg);
Document[] addDocs = new Document[]{doc};
harvestLogIndex.update(
"harvestuid",
Long.toString(harvester.getHarvestUid()),
addDocs,
true);
}
COM: <s> a serios error that occured during the harvest preventing it from completing </s>
|
funcom_train/14464658 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateFont(Font f) {
int idx= wkbook.getFontIdx(f);
if (idx == -1) { // can't find it so add new
f= createNewFont(f);
} else
f = wkbook.getFont(idx);
if (f.getIdx()-1!=myxf.getIfnt()) { // then updated the font, must create new xf to link to
Xf xf= cloneXf(myxf);
xf.setFont(f.getIdx()-1);
updateXf(xf);
}
}
COM: <s> update the font for this format handle including updating the xf if necessary </s>
|
funcom_train/25575676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setArrowCount(final int val) {
if (this.arrowCount != val) {
this.arrowCount = val;
final StringBuffer arrows = new StringBuffer();
for (int i = 0; i < val; i++) {
if (this.upward) {
// unicode upward arrow
arrows.append('\u2191');
} else {
// unicode downward arrow
arrows.append('\u2193');
}
}
setText(arrows.toString());
setVisible(false);
if (val != 0) {
setSize(getPreferredSize());
setVisible(true);
}
}
}
COM: <s> sets the number of displayed arrows </s>
|
funcom_train/29616210 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int ckgp(int[]inst, double[]sclkdp, double[]tol, byte[]ref, double[]cmat, double[]clkout, int[]found) throws Exception {
return(perror(jspice_ckgp(inst, sclkdp, tol, ref, cmat, clkout, found)));
}
COM: <s> get pointing attitude for a specified spacecraft clock time </s>
|
funcom_train/9883218 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected DefaultMutableTreeNode createTrainingGUIResult() {
DefaultMutableTreeNode root = new DefaultMutableTreeNode(new LeafInfo("SVM Training Result",
//new SVMTrainViewer( framework, experiment, experimentMap, data, Weights, info, this.data.classifyGenes )));
new SVMTrainViewer( experiment.getExperiment(), Weights, this.data.classifyGenes, data)));
return root;
}
COM: <s> creates svm train result </s>
|
funcom_train/39024067 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testContains() {
System.out.println("contains");
Collection c = generateData();
FilteredCollection instance = new FilteredCollection(c,null,new MetaHandler());
boolean expResult = true;
boolean result = instance.contains(c.iterator().next());
assertEquals(expResult, result);
expResult = false;
result = instance.contains(c);
assertEquals(expResult, result);
}
COM: <s> test of contains method of class filtered collection </s>
|
funcom_train/43267817 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isDragOk(final DropTargetDragEvent e) {
if (isDragFlavorSupported(e) == false) {
return false;
}
// Grab the drop action from the event and check against acceptable
// actions
final int da = e.getDropAction();
// Compare to acceptable action
if ((da & ConceptButtonDropPanel.this.acceptableActions) == 0) {
return false;
}
return true;
} // End isDragOK
COM: <s> called by drag enter and drag over and checks the flavors and </s>
|
funcom_train/13524213 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testKeepNbDigits() {
assertEquals(0.1,ControllerImpl.keepNbDigits(2,0.10000001));
assertEquals(1.0,ControllerImpl.keepNbDigits(2,0.99999999));
assertEquals(1.16,ControllerImpl.keepNbDigits(2,1.159));
assertEquals(1.16,ControllerImpl.keepNbDigits(2,1.155));
assertEquals(1.15,ControllerImpl.keepNbDigits(2,1.154));
assertEquals(1.15,ControllerImpl.keepNbDigits(2,1.151));
}
COM: <s> test keep nb digits int double </s>
|
funcom_train/16166073 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDatagen()
{
String args[] = {"derd.xml"};
System.out.println("Running tests.");
assertEquals(Datagen.run(args),0);
args[0]="";
assertEquals(Datagen.run(args),1);
}
COM: <s> test the return result from datagen using </s>
|
funcom_train/25588769 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void printXML(byte[] body) {
String debugOutput = System.getProperty("debug", "false");
if (debugOutput.equals("true") || debugXML) {
System.out.println("Received xml:");
XMLOutputStream out = new XMLOutputStream(System.out);
ByteArrayInputStream tmpIn = new ByteArrayInputStream(body);
Document tmpDoc = new Document();
try {
tmpDoc.load(tmpIn);
tmpDoc.save(out);
} catch (Exception e) {
}
}
}
COM: <s> when debugging is enabled print the received xml </s>
|
funcom_train/26212840 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Address getAddress(){
String zip = tfZip.getText();
String town = tfTown.getText();
String street = tfStreet.getText();
String number = tfNumber.getText();
Address result = new Address();
result.setCity(town);
result.setZipcode(zip);
result.setStreet(street);
result.setHouseNumber(number);
return result;
}
COM: <s> collects the input form the input fields and creates a new address object </s>
|
funcom_train/9116586 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void roll(double distance, int speed, boolean immediateReturn){
double avgRadius=(LEFT_RADIUS+RIGHT_RADIUS)/2.0;
leftMotor.setSpeed((int) (avgRadius*speed/LEFT_RADIUS));
rightMotor.setSpeed((int) (avgRadius*speed/RIGHT_RADIUS));
leftMotor.rotate((int) (distance/(2*Math.PI*LEFT_RADIUS)*360), true);
rightMotor.rotate((int) (distance/(2*Math.PI*RIGHT_RADIUS)*360), immediateReturn);
}
COM: <s> used for calibration of mechanical constants </s>
|
funcom_train/26199642 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDefaultSaveDirectory(String dir){
defaultSaveDirectory = dir;
Node n = DOM.getFirstChildNodeWithName(document.getDocumentElement(), "SAVE_DIRECTORY");
n.removeChild(n.getChildNodes().item(0));
n.appendChild(document.createTextNode(dir));
S.out("saving: " + defaultSaveDirectory);
saveDefaults();
}
COM: <s> sets the default save directory for the mdx builder queries </s>
|
funcom_train/23216821 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addRulePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_KnowledgeBase_rule_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_KnowledgeBase_rule_feature", "_UI_KnowledgeBase_type"),
ContractPackage.Literals.KNOWLEDGE_BASE__RULE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the rule feature </s>
|
funcom_train/44165698 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Element updateGameOptions(Element element) {
Game game = getFreeColClient().getGame();
Element mgoElement = (Element)element
.getElementsByTagName("gameOptions").item(0);
OptionGroup gameOptions = game.getSpecification()
.getOptionGroup("gameOptions");
gameOptions.readFromXMLElement(mgoElement);
gui.updateGameOptions();
return null;
}
COM: <s> handles an update game options message </s>
|
funcom_train/50084238 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void growAtomContainerArray() {
growArraySize = atomContainers.length;
AtomContainer[] newatomContainers = new AtomContainer[atomContainers.length + growArraySize];
System.arraycopy(atomContainers, 0, newatomContainers, 0, atomContainers.length);
atomContainers = newatomContainers;
Double[] newMultipliers = new Double[multipliers.length + growArraySize];
System.arraycopy(multipliers, 0, newMultipliers, 0, multipliers.length);
multipliers = newMultipliers;
}
COM: <s> grows the atom container array by a given size </s>
|
funcom_train/15409503 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DataSource lookup(String jndiName) {
try {
if (!jndiName.startsWith("java:")){
jndiName = jndiPrefix + jndiName;
}
Context ctx = new InitialContext();
DataSource ds = (DataSource) ctx.lookup(jndiName);
if (ds == null) {
throw new PersistenceException("JNDI DataSource [" + jndiName + "] not found?");
}
return ds;
} catch (NamingException ex) {
throw new PersistenceException(ex);
}
}
COM: <s> return the data source by jndi lookup </s>
|
funcom_train/3810705 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JavaQName getProxyClass() {
if (proxyClass == null) {
JavaQName chainClass = getChainInterface();
if (chainClass == null) {
return null;
} else {
return JavaQNameImpl.getInstance(chainClass.getPackageName(),
chainClass.getClassName() + "Impl");
}
} else {
return proxyClass;
}
}
COM: <s> p returns the class being generated for the chain objects </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.