__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/1238920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setAttachments(org.apache.axis.client.Call call) throws AxisFault {
// Set the attachments.
Object[] attachments = getAttachments();
for(int i=0;i<attachments.length;i++){
call.addAttachmentPart(attachments[i]);
}
clearAttachments();
}
COM: <s> copy the attachments from the stub to the call object </s>
|
funcom_train/8067323 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadIndividuals() {
int numIndividuals = parser.getIndividualNodes().size();
FigViewParameter param;
for (int i=0; i<numIndividuals; i++){
param = parser.getIndividualNodes().get(i);
System.out.println("Valor de la propiedad de objetos " + param);
//create the OWL Entitiy
OWLClass c = ExampleViewComponent.manager.getOWLClass(param.getOWLEntityName());
//add the pair to the hashtable
individuals.put(c, param);
}
}
COM: <s> load the individuals declared in the view file </s>
|
funcom_train/36462880 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void appendEmptyElement(OMElement rootOMElement, OMElement node) {
OMNamespace ns = fac.createOMNamespace(node.getQName().getNamespaceURI(),
node.getQName().getPrefix());
OMElement el = fac.createOMElement(node.getLocalName(), ns);
rootOMElement.addChild(el);
}
COM: <s> append an empty om element to a root element </s>
|
funcom_train/23269104 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void writeHTMLBody(final NSTransformerHandler htmlHandler) throws SAXException {
htmlHandler.startElement("body");
try {
writeHTMLBodyContent(htmlHandler);
} catch (SAXException saxe) {
if (!(saxe.getCause() instanceof IOException)) htmlHandler.endElement("body");
throw saxe;
}
htmlHandler.endElement("body");
return;
}
COM: <s> write the html quot body quot element </s>
|
funcom_train/25283579 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateNewShape(final Shape shp, final int x, final int y) {
if (x > ini_x)
shp.setWidth(x - ini_x);
if (x < ini_x) {
shp.setX(x);
shp.setWidth(ini_x - x);
}
if (y > ini_y)
shp.setHeight(y - ini_y);
if (y < ini_y) {
shp.setY(y);
shp.setHeight(ini_y - y);
}
}
COM: <s> refreshed the new shape that is being drawn </s>
|
funcom_train/8078647 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean checkForMissing(Instances data) {
for (int i = 0; i < data.numInstances(); i++) {
Instance inst = data.instance(i);
for (int j = 0; j < data.numAttributes(); j++) {
if (inst.isMissing(j)) {
return true;
}
}
}
return false;
}
COM: <s> checks if instances have a missing value </s>
|
funcom_train/29611284 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Class loadScriptClass(URLConnection conn) throws IOException, ScriptException {
GroovyClassLoader loader = new GroovyClassLoader(parentLoader());
try {
return loader.parseClass(conn.getInputStream(), conn.getURL().getFile());
} catch (CompilationFailedException e) {
throw new ScriptException(conn.getURL(), e);
}
}
COM: <s> loads the script class using a new </s>
|
funcom_train/5855620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Method getInterfaceMethod(String name, String descriptor) {
for (int i = 0, n = interfaces.length; i < n; i++) {
Method method = interfaces[i].getMethod(name, descriptor);
if (method != null) { return method; }
}
return null;
}
COM: <s> return the interface method matching the given name and descriptor </s>
|
funcom_train/13211478 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void recordNextGameState(GameState state) {
if (nextStatesRoot!=null) {
Element stateRoot = nextStatesDoc.createElement("state" + nextStatesIndex);
if (state.save(nextStatesDoc, stateRoot)==0) {
nextStatesRoot.appendChild(stateRoot);
nextStatesIndex++;
} else {
stopRecording();
}
}
}
COM: <s> a next game state shall be saved append it to the gamestates file </s>
|
funcom_train/37448548 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void apply (Collection proteins, InteractionNetwork aGraph) {
proteins = modifyCollection (proteins, aGraph);
if (null != proteins) {
Iterator iterator = proteins.iterator();
while (iterator.hasNext()) {
applyBehaviour ((BasicGraphI) iterator.next());
}
} // if
}
COM: <s> apply the implemented behaviour to a set of nodes </s>
|
funcom_train/18361605 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getProperty(String string) throws SAXNotRecognizedException, SAXNotSupportedException {
if(string.equals(getProp(PROP_XML_STRING))) {
if(currentSequence.empty())
return null;
else
return peekCurrentSequence().toString();
} else if(string.equals(getProp(PROP_REGEX_STYLESHEET_NODE)))
return stylesheet;
else {
handleNotSupportedOrNotRecognizedProperty(string);
return null;
}
}
COM: <s> simply returns a property associated with this instance </s>
|
funcom_train/47980553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendServiceDiscoveryIQ(String serviceNamespace){
MobilisServiceDiscoveryBean bean = new MobilisServiceDiscoveryBean(serviceNamespace, Integer.MIN_VALUE, false);
bean.setType(XMPPBean.TYPE_GET);
bean.setFrom(mMXAProxy.getXmppJid());
bean.setTo(mServerCoordinatorJid);
mMXAProxy.sendIQ(beanToIQ(bean, true));
Log.v("IQProxy", "MobilisServiceDiscoveryBean send");
}
COM: <s> sends a mobilis service discovery bean to the an mobilis xhunt game service </s>
|
funcom_train/6401917 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int findThirdVertex(Edge edge) {
int result = -1;
if (edge.equals(vertexIndex[0], vertexIndex[1])) result = vertexIndex[2];
if (edge.equals(vertexIndex[1], vertexIndex[2])) result = vertexIndex[0];
if (edge.equals(vertexIndex[0], vertexIndex[2])) result = vertexIndex[1];
return result;
}
COM: <s> given two vertex indices of this triangle find the third vertex index </s>
|
funcom_train/45736897 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String generateEnum(TSEnum tsEnum) throws OdbgenException {
Template template = TemplatesUtils.getTemplateJar(CodeStorage.Templates.ENUM.getQualifiedName(), this._standardTemplatesJar);
VelocityContext context = new VelocityContext();
context.put("enum", tsEnum );
String res = TemplatesUtils.merge(template, context);
return res;
}
COM: <s> generates the content of the specified enum </s>
|
funcom_train/9384515 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean deselect(ViewInfo viewInfo) {
if (viewInfo == null) {
return false;
}
for (ListIterator<Selection> it = mSelections.listIterator(); it.hasNext(); ) {
Selection s = it.next();
if (viewInfo == s.getViewInfo()) {
it.remove();
return true;
}
}
return false;
}
COM: <s> deselects a view info </s>
|
funcom_train/12193208 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Iterator iterator() {
return new Iterator() {
Iterator i = backingSet.iterator();
public boolean hasNext() {
return i.hasNext();
}
// ensure that the returned object is wrapped as a TypedMapEntry
public Object next() {
return new TypedMapEntry((Map.Entry) i.next());
}
public void remove() {
i.remove();
}
};
}
COM: <s> this code iterator code returned by this method ensures that returned </s>
|
funcom_train/119926 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processWindowEvent(WindowEvent e) {
//
if (e.getID() == WindowEvent.WINDOW_CLOSING) {
// only close the window when we are not in embedded mode
// release resources and exit if we are not running embedded, buttonImage.buttonEdge., as
// part of another application
//super.processWindowEvent(buttonEdge);
this.dispose() ;
}
}
COM: <s> overriden in order to be able to deal with window events </s>
|
funcom_train/41018036 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_testBundleAttributes() {
assertEquals(Long.valueOf(bundle.getBundleId()), bundleMBean
.getBundleId());
assertEquals(Long.valueOf(bundle.getLastModified()), bundleMBean
.getLastModified());
assertEquals(bundle.getLocation(), bundleMBean.getLocation());
}
COM: <s> tests bundle attributes </s>
|
funcom_train/7270079 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTextProvider(TextProvider<E> provider) {
if (provider == null) {
throw new NullPointerException("provider must not be null");
}
TextProvider oldProvider = this.provider;
this.provider = provider;
firePropertyChange(TEXT_PROVIDER_PROPERTY, oldProvider, this.provider);
}
COM: <s> sets a new next provider and fires a property change event </s>
|
funcom_train/50963166 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean destroy_object_1(Term id) throws JavaException {
id = id.getTerm();
try {
if (id.isGround()) {
unregisterDynamic((Struct) id);
}
return true;
} catch (Exception ex) {
// ex.printStackTrace();
throw new JavaException(ex);
}
}
COM: <s> destroy the link to a java object called not directly but from </s>
|
funcom_train/32777712 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void lifeCycle() {
// make a new SimProcess
SimProcess arrivingProcess = createSuccessor();
if (arrivingProcess == null) {
setRepeating(false);
return;
}
// debug out
if (currentlySendDebugNotes()) {
sendDebugNote("activates " + arrivingProcess.getQuotedName());
}
// make him arrive at the system right now (after this
// ArrivalProcess)
arrivingProcess.activate(new TimeSpan(0));
// wait until next SimProcess is to arrive
hold(new TimeSpan(_arrivalRate.sample()));
}
COM: <s> the code arrival process code is some kind of source for </s>
|
funcom_train/51118008 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDeleteInside() throws IOException {
Repo repo = new MyTempFileRepo();
File test;
test = repo.getFile("test.txt");
assertNotNull(test);
assertTrue(test.exists());
test.delete();
assertTrue(!test.exists());
test = repo.getFile("test.txt");
assertNotNull(test);
assertTrue(!test.exists());
}
COM: <s> test that after deleting editing a file in the repo it should </s>
|
funcom_train/45391852 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getNumDecimals() {
if (this.label != null) {
return 0;
} else if (this.interval != null) {
return Math.max(calcNumDecimals(interval.getStart()),
calcNumDecimals(interval.getEnd()));
} else if (this.carrierVal2 == null) {
return calcNumDecimals(carrierVal1);
} else {
return Math.max(calcNumDecimals(carrierVal1),
calcNumDecimals(carrierVal2.doubleValue()));
}
}
COM: <s> returns how many decimals are in numerics </s>
|
funcom_train/40358862 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConnectorTypeNotFound() {
String connectorType = "UnknownConnectorType";
String expectedResult =
"<CmResponse>\n" +
" <StatusId>5304</StatusId>\n" +
" <CMParams Order=\"0\" CMParam=\""+ connectorType + "\"/>\n" +
"</CmResponse>\n";
doTest(connectorType, expectedResult);
}
COM: <s> test connector type not found returns status code </s>
|
funcom_train/37656634 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected PropertyDescriptor createBadProperty(boolean multiValue) {
return multiValue ?
new BooleanMultiProperty("", "Test boolean property", new Boolean[] {false, true, true}, 1.0f) :
new BooleanProperty("testBoolean", "", false, 1.0f);
}
COM: <s> method create bad property </s>
|
funcom_train/31911195 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int indexOf(Object node) {
if (node == null || !(node instanceof GraphicsNode)) {
return -1;
}
if (((GraphicsNode) node).getParent() == this) {
for (int i = 0; i < count; i++) {
if (node == children[i]) {
return i;
}
}
}
return -1;
}
COM: <s> returns the index in the children list of the specified graphics node or </s>
|
funcom_train/50697521 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isAuthenticated(String username, String password) {
boolean returnFlag = true;
/* boolean returnFlag = false;
try {
UserManager um = getUserManager();
um.authenticate(username, password);
Debug.print("User is authenticated");
returnFlag = true;
}
catch (AuthenticationException authEx) {
authEx.printStackTrace();
}
catch (Exception e) {
e.printStackTrace();
}
*/
return returnFlag;
}
COM: <s> authenticate the user using the portal user profiles </s>
|
funcom_train/29618707 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MgisComboBox getJFAOBox() {
if (jFAOBox == null) {
Vector faoOptions = new Vector();
faoOptions.add(AppTextsDAO.get("OPTION_ALL"));
faoOptions.add(AppTextsDAO.get("LABEL_YES"));
faoOptions.add(AppTextsDAO.get("LABEL_NO"));
faoOptions.add(AppTextsDAO.get("OPTION_UNDEFINED"));
jFAOBox = new MgisComboBox(faoOptions);
jFAOBox.setBounds(new java.awt.Rectangle(100,6,79,19));
}
return jFAOBox;
}
COM: <s> this method initializes j faobox </s>
|
funcom_train/2915407 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isConstant(IField field) {
try {
if (field.isEnumConstant() || field.getDeclaringType().isInterface() || (Flags.isPublic(field.getFlags()) && Flags.isFinal(field.getFlags()) && Flags.isStatic(field.getFlags()))) {
return true;
}
} catch (JavaModelException e) {
return false;
}
return false;
}
COM: <s> constants are fields that are </s>
|
funcom_train/49049481 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isLastPage(String currPage, Map requestMap) {
for (int i = order.indexOf(currPage) + 1; i < order.size(); i++) {
if (getParam(requestMap, (String) order.elementAt(i)) != null) {
return false;
}
}
return true;
}
COM: <s> checks whether or not the given page is the last preferences page </s>
|
funcom_train/17007806 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createDAO() {
try {
String[] connectParam = new String[5];
loadProperties(connectParam);
String connectInfo = getConnnectionInfo(connectParam);
String username = UserConfigure.getDbUserID();
String userpass = UserConfigure.getDbUserPassword();
createDAO(connectParam[0], connectInfo, username, userpass);
}
catch (Exception ex) {
ex.printStackTrace();
}
}
COM: <s> creates new instance of data access object by getting username and </s>
|
funcom_train/31208263 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getCatalogName(int column) throws SQLException {
try {
if(Trace.isDetailed()) Trace.trace(getId(),column);
// checkColumnIndex already calls checkClosed
rs.checkColumnIndex(column);
return "";
} catch(Throwable e) {
throw convertThrowable(e);
}
}
COM: <s> returns the catalog name </s>
|
funcom_train/19036276 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Post addPostOnRoot(PostType type, String title, String webLink, String summary, String additionalInformation, MemberID memberID) {
Post post = null;
if(type != null) {
StoredPostFolder temp = this.getRootFolder(type);
if(temp != null) {
post = this.addPost(temp.getFolder().getPfid(), title, webLink, summary, additionalInformation, memberID);
}
}
return post;
}
COM: <s> adds a new post to the root of a certain type of post </s>
|
funcom_train/26176824 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected SimpleTaglet createSimpleTaglet (String impl, String name) {
try {
final Class simpleTagletClass= Class.forName(impl);
final Constructor nameConstructor=
simpleTagletClass.getConstructor(new Class[] { String.class });
return (SimpleTaglet) nameConstructor.newInstance(new Object[] { name });
} catch (Exception e) {
this.logger.warning(
"Error creating simple taglet '" + impl +
"' (tag '" + name + "' will be ignored)."
);
logger.warning(e);
}
return null;
}
COM: <s> creates a new simple taglet using the specified implementation class </s>
|
funcom_train/33412883 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCustomFindCommand( String key, String command ) {
if(key==null || command==null) return;
String prefix = this.getCustomCommandPrefix();
if( Configurator.isLowerCase() ) {
BeanManagerImpl.customCommands.setProperty(
prefix+"."+key,
command.toLowerCase() );
}
else {
BeanManagerImpl.customCommands.setProperty(
prefix+"."+key,
command );
}
}
COM: <s> add a new custom find command </s>
|
funcom_train/34874551 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reset() {
currentScreenMode = "";
currentDuration = 0l;
currentMediaFileID = -1;
currentMediaTime = 0l;
currentMuteState = false;
currentState = States.None;
videoDiskSpaceString = "";
currentVolume = 0f;
trueFilters = new HashMap<String, ArrayList<String>>();
falseFilters = new HashMap<String, ArrayList<String>>();
}
COM: <s> reinitialize some members </s>
|
funcom_train/9117844 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJPublishButton() {
if (jPublishButton == null) {
jPublishButton = new JButton();
jPublishButton.setText("Publish");
jPublishButton.setName("jPublishButton");
jPublishButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
publishfile();
}
});
}
return jPublishButton;
}
COM: <s> this method initializes j publish button </s>
|
funcom_train/43372861 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasQueryItemData() throws Exception {
boolean hasQueryItemData = false;
if (this.isQueryItem) {
if (this.getEbiRecords().size() > 0) {
hasQueryItemData = true;
}
} else {
List<EBICollection> queryItems = this.getAllQueryItemsFromCollection();
for (EBICollection queryItem : queryItems) {
if (queryItem.hasEbiData) {
hasQueryItemData = true;
break;
}
}
}
return hasQueryItemData;
}
COM: <s> used when generating rifcs to determine if the collection has ebi data </s>
|
funcom_train/9408100 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int size() {
int count = 0;
for (Node<E> p = first(); p != null; p = succ(p)) {
if (p.getItem() != null) {
// Collections.size() spec says to max out
if (++count == Integer.MAX_VALUE)
break;
}
}
return count;
}
COM: <s> returns the number of elements in this queue </s>
|
funcom_train/8579587 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void clearEntries(IQueryable environment) {
// TODO: consider optimization by keeping maps from environment to
// entries
LinkedList<IAgentAddress> trash = new LinkedList<IAgentAddress>();
for (QueryCacheEntry entry : _entries.values()) {
if (entry.getEnvironment().equals(environment)) {
trash.add(entry.getAddress());
}
}
for (IAgentAddress address : trash) {
_entries.remove(address);
}
}
COM: <s> removes from the cache all entries of given environment </s>
|
funcom_train/22277329 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void popState() {
GraphicsState state = state();
graphicsStates.removeLastElement();
if (state.awtGraphics != null) {
state.awtGraphics.dispose();
currentAwtGraphics = awtGraphics();
}
state = state();
if (state != null)
restoreAwtGraphics(currentAwtGraphics, state);
}
COM: <s> restores the graphics object to its condition before the most recent </s>
|
funcom_train/19765420 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringItem getItem_mcc() {
if (item_mcc == null) {//GEN-END:|39-getter|0|39-preInit
// write pre-init user code here
item_mcc = new StringItem("mcc", null);//GEN-LINE:|39-getter|1|39-postInit
// write post-init user code here
}//GEN-BEGIN:|39-getter|2|
return item_mcc;
}
COM: <s> returns an initiliazed instance of item mcc component </s>
|
funcom_train/30196826 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetNomeTipoCompetenza() {
System.out.println("setNomeTipoCompetenza");
String nomeTipoCompetenza = "test";
TipoCompetenza instance = new TipoCompetenza();
instance.setNomeTipoCompetenza(nomeTipoCompetenza);
String result = instance.getNomeTipoCompetenza();
assertEquals("test", result);
}
COM: <s> test of set nome tipo competenza method of class com </s>
|
funcom_train/46760792 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InvoiceModel getInvoice(final long invoiceId, final IChainStore chain, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
return BillingData.getInvoice(invoiceId, chain, call);
}}; return (InvoiceModel) call(method, call);
}
COM: <s> same transaction return the single invoice model for the primary key </s>
|
funcom_train/3756734 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JFreeChart createXYPlot(XYDataset dataSet) throws Exception {
// create a default chart based on some sample data...
String title = "Sample XYPlot";
String domain = "Domain";
String range = "Range";
log.log(Level.INFO,"ENTERINT CREATE XY PLOT");
JFreeChart chart =
this.createXYLineChart(
title,
domain,
range,
dataSet,
PlotOrientation.VERTICAL,
true,
true,
false);
// then customise it a little...
chart.setBackgroundPaint(
new GradientPaint(0, 0, Color.white, 0, 1000, Color.green));
return chart;
// return null;
}
COM: <s> creates and returns a sample xy plot </s>
|
funcom_train/39270226 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected IXholon makeTestEmployee() {
Employee emp = new FacultyMember();
emp.setEmplFirst("Ken");
emp.setEmplLast("Webb");
emp.setHomeAddress(new Address());
emp.getHomeAddress().setStreet("Grenon");
emp.getHomeAddress().setCity("Ottawa");
emp.getHomeAddress().setStateOrProv("ON");
emp.getHomeAddress().setPostalCode("K2B 6G1");
emp.setEmplHomePhone("721-1754");
emp.setPosition("High");;
emp.setHourlyRate(1.23);
emp.setDateHired(new Date());
return emp;
}
COM: <s> make a test employee </s>
|
funcom_train/29829278 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFriendlyName(JID jid) {
if (jid == null) return null;
String str = getRosterItemHashString(jid, "", false);
RosterItem item = (RosterItem) curRoster.get(str);
if (item == null) return null;
return item.getFriendlyName();
}
COM: <s> returns friendly name of the code jid code according to appropriate </s>
|
funcom_train/49643213 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getCanonical(int nub_concept_id_BD) {
ResultSet rs = DataBaseManager.makeQuery(
"select tn.canonical from taxon_name tn, taxon_concept tc where tc.id= "
+ nub_concept_id_BD + " and tc.taxon_name_id = tn.id",
conx);
try {
if (rs.next()) {
String cadena = rs.getString(1);
rs.getStatement().close();
rs.close();
return cadena;
}
} catch (SQLException e) {
e.printStackTrace();
}
return null;
}
COM: <s> gets the canonical of a taxon concept </s>
|
funcom_train/20117944 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean unlockConnection() throws RepositoryException {
if (_connectionLocked) {
_repository.unlockDatabaseConnection(getDatabaseName());
_connectionLocked = false;
_question =
new QuestionEvent(QuestionEvent.LOG_ACTION,
Strings.padWithDots("Unlocking connection to '" + getDatabaseName() + "'") + "ok\n");
return true;
}
return false;
}
COM: <s> unlock connection to database </s>
|
funcom_train/24194924 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private BTNode internalFindNode(BTNode currentNode, Identifier id) {
if (currentNode.getID().equals(id)) {
return currentNode;
}
for (BTNode n : currentNode.getChildren()) {
BTNode nodeFound = internalFindNode(n, id);
if (nodeFound != null) {
return nodeFound;
}
}
return null;
}
COM: <s> finds a node by identifier starting the search in code current node code </s>
|
funcom_train/20325389 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void openLinkInDictionary() {
if (Desktop.isDesktopSupported()) {
Desktop desktop = Desktop.getDesktop();
try {
String word = null;
if (lastSelected != null) {
word = lastSelected.getWord();
}
URI uri = new URI("http", "dictionary.reference.com",
"/browse/" + word, null);
desktop.browse(uri);
} catch (Exception e) {
e.printStackTrace();
}
} else {
// TODO: error handling
}
}
COM: <s> opens the browser at dictionary </s>
|
funcom_train/51764030 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isNecessaryParamSet() throws MojoExecutionException {
StringBuffer messageBuffer = new StringBuffer();
boolean paramsOk = ParamCheckUtil.checkParam(
messageBuffer,
getPersistencyClass(),
"PersistencyClassName");
if (!paramsOk) {
throw new IllegalStateException(messageBuffer.toString());
}
return true;
}
COM: <s> checks that the necessairy parameters are set in the </s>
|
funcom_train/20046242 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isMatchTo(String tagName, XAttributeList list) {
if (!name.equals(tagName)) return false;
boolean result = true ;
for (int i = 0; i < attrList.length; i++) {
result &= checkAttr(i, list) ;
}
return result ;
}
COM: <s> checks if this tag matches tag passed in parameters </s>
|
funcom_train/45749962 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSourceVariablePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_BinaryAssociationAtom_sourceVariable_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_BinaryAssociationAtom_sourceVariable_feature", "_UI_BinaryAssociationAtom_type"),
URMLPackage.Literals.BINARY_ASSOCIATION_ATOM__SOURCE_VARIABLE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the source variable feature </s>
|
funcom_train/41101558 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void receiveEvent(Event event) {
String destination = event.getRemoteDestination();
// build payload
byte[] payload = event.toByteArray();
// create msg
Message msg = new Message(payload, destination);
// set msg flags
msg.setProtocol(MessageProtocols.EVENTS);
if (event.isCritical()) {
msg.setReliable();
}
// send
netFW.send(msg);
}
COM: <s> creates a message which includes the passed event as its payload </s>
|
funcom_train/20978326 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSkinLocations(String[] directories) {
this.directories = directories;
Vector skins = new Vector();
for (int i = 0, c = directories.length; i < c; i++) {
buildSkinList(skins, new File(directories[i]));
}
skinList.setListData(skins);
}
COM: <s> set search paths </s>
|
funcom_train/12305618 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent evt) {
Object source = evt.getSource();
if (source == okButton) {
if (validateSettings()) {
myproxyInit.setMyproxyPassword(password);
cancel = false;
setVisible(false);
}
} else if (source == cancelButton) {
cancel = true;
setVisible(false);
} else {
System.err.println("Unidentified event in PasswordDialog");
}
}
COM: <s> handles button events for saving and exiting </s>
|
funcom_train/34194769 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double computeScalingFactor() {
// Get fullscreen dimension
Dimension d = projectSelectPanel.getFullSceneDimensionPX();
// Get the first image file
BufferedImage image = screenFrameManager.getFrame(1);
// Only do anything when there is somthing to compute
if (image == null || d == null) {
return 1d;
} else {
return ((double) image.getWidth()) / ((double) d.width);
}
}
COM: <s> compute scaling factor </s>
|
funcom_train/21611778 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addOperations(Operation[] operations) {
if( isCompleted() ) {
throw new IllegalStateException("This sequence was completed.");
}
if( temporaryList == null ) {
temporaryList = new ArrayList<Operation>();
}
temporaryList.addAll( Arrays.asList(operations) );
}
COM: <s> adds a list of operations in the order they are provided </s>
|
funcom_train/17887216 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addFromCardinalityPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Relationship_fromCardinality_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Relationship_fromCardinality_feature", "_UI_Relationship_type"),
MxgraphclipsePackage.Literals.RELATIONSHIP__FROM_CARDINALITY,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the from cardinality feature </s>
|
funcom_train/9063753 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ImageRegistry getImageRegistry() {
if (_imageRegistry == null) {
_imageRegistry = new ImageRegistry();
ImageDescriptor imgDesc = new ResourceImageDescriptor(
"/de/jaret/examples/timebars/calendar/swt/renderer/clock.gif");
_imageRegistry.put("clock", imgDesc);
}
return _imageRegistry;
}
COM: <s> retrieve the image registry lazy creation </s>
|
funcom_train/18725879 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireStateChanged() {
final Object[] pairs = listeners.getListenerList();
for (int i = pairs.length - 2; i >= 0; i -= 2) {
if (pairs[i] == ChangeListener.class) {
if (event == null) {
event = new ChangeEvent(this);
}
((ChangeListener) pairs[i + 1]).stateChanged(event);
}
}
}
COM: <s> notifies all listeners of a state change </s>
|
funcom_train/40799674 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private AutoManifest getManifest() throws IOException {
// TBD: Should recognize entry with lower case?
InputFlow mif = getInputFlow("META-INF/MANIFEST.MF");
if (mif != null) {
return new AutoManifest(new Manifest(mif.is), location);
} else {
throw new IOException("Manifest is missing");
}
}
COM: <s> get the manifest for this archive </s>
|
funcom_train/28750808 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setComponentid(Long newVal) {
if ((newVal != null && this.componentid != null && (newVal.compareTo(this.componentid) == 0)) ||
(newVal == null && this.componentid == null && componentid_is_initialized)) {
return;
}
this.componentid = newVal;
componentid_is_modified = true;
componentid_is_initialized = true;
}
COM: <s> setter method for componentid </s>
|
funcom_train/20783821 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setQualityMixingFactor(float qualityMixingFactor) {
if(qualityMixingFactor<0) qualityMixingFactor=0; else if(qualityMixingFactor>1) qualityMixingFactor=1;
this.qualityMixingFactor = qualityMixingFactor;
getPrefs().putFloat("EyeTracker.qualityMixingFactor",qualityMixingFactor);
}
COM: <s> sets the mixing factor for tracking quality measure </s>
|
funcom_train/20143423 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Map convertHeadersToMap(Header[] headers) {
HashMap map = new HashMap();
for (int i = 0; headers != null && i < headers.length; i++) {
map.put(headers[i].getName(), headers[i].getValue());
}
return map;
}
COM: <s> converts an array of header objects to a map of name value pairs </s>
|
funcom_train/47733969 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void drawCoordinateSystem(Graphics2D g2d) {
// TODO extend this, so it draws axis labels
Color last = g2d.getColor();
g2d.setColor(Color.BLACK);
// y axis
g2d.drawLine(0, 0, 0, -this.getHeight() + 2 * border);
// xaxis
g2d.drawLine(0, 0, drawingWidth, 0);
g2d.setColor(last);
}
COM: <s> draws a coordinate system </s>
|
funcom_train/37610280 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int qiSFVeh0Loc(Integer qnum, Integer lnum) {
int qnbr = qnum.intValue();
int lnbr = lnum.intValue();
if (ccc.useSt(street[qnbr][lnbr]).useFrag(fragment[qnbr][lnbr]).getVehCount()>0)
return Math.round(10*ccc.useSt(street[qnbr][lnbr]).useFrag(fragment[qnbr][lnbr]).useVeh(0).getLocation());
else return 0;
}
COM: <s> get the tt uquery tt first vehicle location data </s>
|
funcom_train/3936591 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Button createButtonFileDialog(Composite inParent, String inButtonLabel) {
Button outButton = new Button(inParent, SWT.PUSH);
outButton.setText(inButtonLabel);
outButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
outButton.addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent inEvent) {
openFileDialog();
}
public void widgetSelected(SelectionEvent inEvent) {
openFileDialog();
}
});
return outButton;
}
COM: <s> creates a button to open a file dialog </s>
|
funcom_train/39971814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void select(Card c){
if(Constants.connectionState == ConnectionType.DISCONNECTED && c.getOwner() == Core.getInstance().getCurrentPlayer()
|| Constants.connectionState == ConnectionType.CONNECTED && c.getOwner() == Core.getInstance().getThisPlayer()){
guiCore.selectionStatus=SelectionStatus.CARD_SELECTED;
guiCore.setSelectedCard(c);
guiCore.updateAll();
}
else
deselect();
CardViewPanel.getInstance().setShownCard(c);
}
COM: <s> selects the given card and prepares the gui for further actions </s>
|
funcom_train/48407432 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addBasePluginPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_MethodPlugin_basePlugin_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_MethodPlugin_basePlugin_feature", "_UI_MethodPlugin_type"),
SpemxtcompletePackage.eINSTANCE.getMethodPlugin_BasePlugin(),
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the base plugin feature </s>
|
funcom_train/28153469 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void visitRelationalExpression(/* @non_null */JRelationalExpression self) {
self.right().accept(this);
self.left().accept(this);
JRelationalExpression newSelf = new JRelationalExpression(self.getTokenReference(), self.oper(), this.getArrayStack().pop(), this.getArrayStack().pop());
this.getArrayStack().push(newSelf);
}
COM: <s> visits the given relational expression </s>
|
funcom_train/9431513 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void toString(StringBuilder builder) {
builder.append("{ ");
for (String key : this.keySet()) {
builder.append(key);
builder.append("=");
builder.append(this.getAsString(key));
builder.append(", ");
}
builder.append("}");
}
COM: <s> helper for building string representation leveraging the given </s>
|
funcom_train/8568532 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void swapPosition(Cell other) {
CellInternals tempCI = other.internals;
boolean tempIO = other.isIO;
int tempGeneration = other.generation;
other.internals = this.internals;
other.isIO = this.isIO;
other.generation = this.generation;
this.internals = tempCI;
this.isIO = tempIO;
this.generation = tempGeneration;
}
COM: <s> swaps the internals of two cells </s>
|
funcom_train/27943350 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setEnabledControls( boolean bStatus ) {
nickNameText.setEnabled( bStatus );
userIdText.setEnabled( bStatus );
pwdField.setEnabled( bStatus );
confPwdField.setEnabled( bStatus );
addButton.setEnabled( bStatus );
autoConnectCheck.setEnabled( bStatus );
parentDlg.enableComponents( bStatus );
}
COM: <s> enable disable all dialog controls </s>
|
funcom_train/13597424 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void assertEquals(Dictionary dictionary1, Dictionary dictionary2){
List sorted1 = dictionary1.getSortedList();
List sorted2 = dictionary2.getSortedList();
assertEquals(sorted1, sorted2);
List graphemes1 = dictionary1.getGraphemes();
List graphemes2 = dictionary2.getGraphemes();
assertEquals(graphemes1, graphemes2);
List phonemes1 = dictionary1.getPhonemes();
List phonemes2 = dictionary2.getPhonemes();
assertEquals(phonemes1, phonemes2);
}
COM: <s> assert that the 2 dictionaries are equal else raise an </s>
|
funcom_train/19054031 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean exists(String codeString) {
Iterator headerIterator = headerList.iterator();
while (headerIterator.hasNext()) {
if (headerIterator.next().toString().equals(codeString))
return true;
}
Iterator footerIterator = footerList.iterator();
while (footerIterator.hasNext()) {
if (footerIterator.next().toString().equals(codeString))
return true;
}
return false;
}
COM: <s> checks if the code string already exists </s>
|
funcom_train/5372271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dispose () {
if (!parent.isDisposed()) {
parent.removeListener (SWT.Resize, tableListener);
ScrollBar hBar = parent.getHorizontalBar ();
if (hBar != null) hBar.removeListener (SWT.Selection, scrollbarListener);
ScrollBar vBar = parent.getVerticalBar ();
if (vBar != null) vBar.removeListener (SWT.Selection, scrollbarListener);
}
parent = null;
editor = null;
hadFocus = false;
tableListener = null;
scrollbarListener = null;
}
COM: <s> removes all associations between the editor and the underlying composite </s>
|
funcom_train/7636846 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void registerIntentReceivers() {
IntentFilter filter = new IntentFilter(Intent.ACTION_WALLPAPER_CHANGED);
registerReceiver(mWallpaperReceiver, filter);
filter = new IntentFilter(Intent.ACTION_PACKAGE_ADDED);
filter.addAction(Intent.ACTION_PACKAGE_REMOVED);
filter.addAction(Intent.ACTION_PACKAGE_CHANGED);
filter.addDataScheme("package");
registerReceiver(mApplicationsReceiver, filter);
}
COM: <s> registers various intent receivers </s>
|
funcom_train/42188493 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButtonEdit() {
if (jButtonEdit == null) {
jButtonEdit = new JButton();
jButtonEdit.setText("Editar tipo");
jButtonEdit.setEnabled(false);
jButtonEdit.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
editarTipo();
}
});
}
return jButtonEdit;
}
COM: <s> this method initializes j button edit </s>
|
funcom_train/18595469 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Rectangle getCellBounds(JGraph graph, Object o) {
Rectangle2D rect = graph.getCellBounds(o);
if (rect != null) {
return toScreen(graph, (Rectangle2D)rect.clone());
}
String msg = Strings.get("tester.JGraph.cell_not_found",
new Object[] { o });
throw new LocationUnavailableException(msg);
}
COM: <s> return the bounds of the cell in screen coordinates </s>
|
funcom_train/320135 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void nextToken(int start) {
fToken= fScanner.previousToken(start - 1, LuaScanner.UNBOUND);
fPreviousPos= start;
fPosition= fScanner.getPosition() + 1;
try {
fLine= fDocument.getLineOfOffset(fPosition);
} catch (BadLocationException e) {
fLine= -1;
}
}
COM: <s> reads the next token in backward direction of code start code from </s>
|
funcom_train/47147564 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void draw(Graphics g, FigureEnumeration fe) {
boolean isPrinting = isPrinting(g);
//drawBackground(g);
if ((fBackgrounds != null) && !isPrinting) {
drawPainters(g, fBackgrounds);
}
drawing().draw(g, fe);
if ((fForegrounds != null) && !isPrinting) {
drawPainters(g, fForegrounds);
}
if (!isPrinting) {
drawHandles(g);
}
}
COM: <s> draws the given figures </s>
|
funcom_train/47584454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addActivityPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DataActivity_activity_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_DataActivity_activity_feature", "_UI_DataActivity_type"),
Dfm4bpmnPackage.Literals.DATA_ACTIVITY__ACTIVITY,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the activity feature </s>
|
funcom_train/49016938 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void downloadRepository() {
// try to download the default directory (from jajuk SVN trunk
// directly)
try {
DownloadManager.download(new URL(URL_DEFAULT_WEBRADIOS_1), fwebradios);
} catch (Exception e) {
}
// Load repository if any
if (fwebradios.exists()) {
loadRepository();
}
}
COM: <s> download asynchronously the default streams list </s>
|
funcom_train/33718314 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AxedChar removeChar(int atomicID, AxedChar c, int tag) {
assert atomicID != 0;
AxedEvent e = eventPool.newEvent(atomicID, AxedEvent.REMOVE_CHAR);
e.getRemoveChar().issue(AxedEvent.REMOVE_CHAR, c, (char) 0, tag);
listeners.fireEvent(e);
c = e.getRemoveChar().pnt;
eventPool.releaseEvent(e);
return c;
}
COM: <s> removes a char from the document </s>
|
funcom_train/17181354 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("Metadata".equals(portName)) {
setMetadataEndpointAddress(address);
}
else
{ // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" 未知のポートに対してはエンドポイントのアドレスをセットできません / [en]-(Cannot set Endpoint Address for Unknown Port)" + portName);
}
}
COM: <s> en set the endpoint address for the specified port name </s>
|
funcom_train/27822167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateUI() {
super.updateUI();
if (m_treeNodeRenderer==null || m_treeNodeRenderer instanceof UIResource)
m_treeNodeRenderer=createDefaultTreeNodeRenderer();
m_treeTableCellRenderer=createTreeTableCellRenderer();
if (m_treeMapper!=null)
m_treeMapper.updateUI();
}
COM: <s> called when look and feel is updated </s>
|
funcom_train/36002928 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void check() throws CodeGenMakeException {
if (getCategory() == null || getCategory().length() == 0) {
throw new CodeGenMakeException(
"Missing target ESB service category");
}
if (getName() == null || getName().length() == 0) {
throw new CodeGenMakeException(
"Missing target ESB service name");
}
}
COM: <s> when target is an esb service check that corresponding parameters are set correctly </s>
|
funcom_train/48876750 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Room getFreeRoom(final LectureEvent events[][]) throws DistributionException{
Child.log.debug("Getting free room for child " + this);
final List<Room> possibleRooms = new ArrayList<Room>();
//Get free rooms left for this events
for(final Room r : this.rooms.values())
if(r.isFreePointLeft(events))
possibleRooms.add(r);
if(possibleRooms.isEmpty())
throw new DistributionException("No free rooms left");
else
return possibleRooms.get((int)(Math.random() * possibleRooms.size()));
}
COM: <s> get a random free room </s>
|
funcom_train/25389030 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDenied(Collection denied) {
logger.debug("addDenied(Collection denied=" + denied + ") - start");
if (denied != null) {
for (Iterator iter = denied.iterator(); iter.hasNext();) {
String s = (String) iter.next();
addDeniedPath(s);
}
}
logger.debug("addDenied(Collection denied=" + denied + ") - end");
}
COM: <s> add a collection of denied pathnames </s>
|
funcom_train/8095896 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isOutlier(Instance inst, int index) {
boolean result;
double value;
value = inst.value(m_AttributeIndices[index]);
result = ((m_UpperOutlier[index] < value) && (value <= m_UpperExtremeValue[index]))
|| ((m_LowerExtremeValue[index] <= value) && (value < m_LowerOutlier[index]));
return result;
}
COM: <s> returns whether the instance has an outlier in the specified attribute </s>
|
funcom_train/3106986 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setModified() {
this.dataInit = new HashMap<String, Domaine>();
Domaine domaine;
ArrayList<String> datas = this.getDataNames();
for (int index = 0; index < datas.size(); index++) {
domaine = this.data.get(index);
if (domaine != null) {
this.dataInit.put(datas.get(index), (Domaine) domaine.clone());
}
}
}
COM: <s> define the init value to the current value </s>
|
funcom_train/46692665 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void moveUp() {
if(table.getSelectionCount() <= 0) return;
int[] indices = table.getSelectionIndices();
int closed = -1;
boolean undoPushed = false;
for(int i=0; i<indices.length; i++) {
if(indices[i]-1 == closed) {
closed = indices[i];
continue;
}
if(!undoPushed) {
pushUndo(true);
undoPushed = true;
updateFileStatus(true);
}
swapItems(indices[i], indices[i]-1);
}
}
COM: <s> moves each selected item up one position in the table provided there </s>
|
funcom_train/40621386 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void editCell(int row, int column) {
AbstractCellEditor<R> cellEditor = getCellEditor(column);
if (cellEditor == null) {
return;
}
CellEditInfo<R> editInfo = new CellEditInfo<R>(getDataTable(), row, column,
getRowValue(row));
cellEditor.editCell(editInfo, getCellEditorCallback());
}
COM: <s> invoke the cell editor on a cell if one is set </s>
|
funcom_train/9568895 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e) {
CustomDialog cd=new CustomDialog("Enter a value for " + name +
":",CustomDialog.instantiateFloatDocument());
setValue(cd.showInputDialog(this.getValue()==null?"0":this.getValue().toString()));
}
COM: <s> invoked when an action occurs </s>
|
funcom_train/2904813 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initMajorModule(JXMajorModule module){
if(((moduleManager==null) && (module==this)) || (!moduleManager.contains(module))){
module.setJXCoreModule(this);
if((moduleManager==null) && (module==this)){
handleModuleResponse(module.init());
moduleManager.add(module, false);
}
else{
handleModuleResponse(moduleManager.add(module));
}
handleModuleResponse(module.restoreState());
}
else{
new JXError(getClass(), "Major module loading refused, it already exist");
}
}
COM: <s> initialize a major module and update junk </s>
|
funcom_train/38827832 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeObject( java.io.ObjectOutputStream out ) throws java.io.IOException {
// Call the default write object method.
out.defaultWriteObject();
// Write out the number of elements.
int size = 0;
if (_data != null)
size = _data.getDimension();
out.writeInt( size );
// Write out the coordinate values.
for (int i=0; i < size; ++i)
out.writeDouble( _data.getValue(i) );
}
COM: <s> during serialization this will write out the float64 vector as a </s>
|
funcom_train/1322116 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendKeepAlive(int type) throws IOException {
switch (type){
case 3:
if (pingSent) {
dispatcher.broadcastTerminatedConnection(new Exception("Ping Timeout"));
} else {
//System.out.println("Ping myself");
ping();
}
break;
case 2:
send("<iq/>");
break;
case 1:
send(" ");
}
}
COM: <s> method of sending data to the server </s>
|
funcom_train/27821744 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void notifyCommandExecuted(Command command,int executeType) {
m_executingCommand=false;
Object[] listeners=m_listenerList.getListenerList();
for (int i=listeners.length-2;i>=0;i-=2)
if (listeners[i]==CommandManagerListener.class)
((CommandManagerListener)listeners[i+1]).commandExecuted(this,command,executeType);
}
COM: <s> called on the main thread to notify listeres that command has been executed </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.