__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/3909038 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void elementChanged(XMLDocumentListenerEvent event) {
// Don't listen to events that we have fired
if(event.getSource() == this) return;
// Are we changing the Title Element?
if(isTitleValue && _titleElement != null) {
Element changed_element = event.getElement();
if(_titleElement == changed_element) setText(_titleElement);
}
// Nope
else super.elementChanged(event);
}
COM: <s> over ride to trap this </s>
|
funcom_train/8645484 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void entityIsTransient(PersistEvent event, Map createCache) throws HibernateException {
log.trace("saving transient instance");
final EventSource source = event.getSession();
final Object entity = source.getPersistenceContext().unproxy( event.getObject() );
if ( createCache.put(entity, entity)==null ) {
saveWithGeneratedId( entity, event.getEntityName(), createCache, source, false );
}
}
COM: <s> handle the given create event </s>
|
funcom_train/986975 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void glColor3s (short red, short green, short blue) {
CC.gl_color (gl_util.ItoF (gl_util.CLAMP (red, 0, 255)),
gl_util.ItoF (gl_util.CLAMP (green, 0, 255)),
gl_util.ItoF (gl_util.CLAMP (blue, 0, 255)),
1.0f);
}
COM: <s> glvoid gl color3s glshort red glshort green glshort blue </s>
|
funcom_train/20823461 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resetChannel(final int lightCueIndex, final int channelIndex) {
float value = 0f;
if (lightCueIndex > 0) {
LightCueDetail detail = getDetail(lightCueIndex - 1);
value = detail.getChannelLevel(channelIndex).getChannelLevelValue().getValue();
}
updateChannel(lightCueIndex, channelIndex, true, value);
markDirty();
}
COM: <s> make given channel cell derived </s>
|
funcom_train/20843199 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void serializeTypes(WSDL wsdl, XmlSerializer serializer) throws IOException {
// Start-Tag wsdl:types
serializer.startTag(WSDLConstants.WSDL_NAMESPACE_NAME, WSDLConstants.WSDL_ELEM_TYPES);
for (Iterator it = wsdl.getTypes(); it.hasNext();) {
Schema schema = (Schema) it.next();
schema.serialize(serializer);
}
// End-Tag wsdl:types
serializer.endTag(WSDLConstants.WSDL_NAMESPACE_NAME, WSDLConstants.WSDL_ELEM_TYPES);
}
COM: <s> method to add types block to xml </s>
|
funcom_train/43384757 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(Table table, String fileName, String fileEnd) {
FileOutputStream fos = null;
try {
fos = new FileOutputStream(makeFileName(fileName, fileEnd));
ObjectOutputStream oos = new ObjectOutputStream(fos);
oos.writeObject(table.getRounds());
oos.writeObject(table.getPlayers());
oos.writeObject(table.getConfig());
oos.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
COM: <s> saves the model </s>
|
funcom_train/20042726 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void _setText() {
requiredMethod("getText()") ;
boolean result = true ;
oObj.setText(text + "_") ;
result = (text+"_").equals(oObj.getText()) ;
tRes.tested("setText()", result) ;
}
COM: <s> sets value changed and then compares it to get value </s>
|
funcom_train/18191135 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void drawFaceXY(Graphics g, Color col, double[][] matrix, boolean usePerspective) {
g.setColor(col);
initPolyLine(pos000, posx00, posxy0, pos0y0, matrix, usePerspective); // XY
g.fillPolygon(polyLineX, polyLineY, 5);
}
COM: <s> draws the face xy with the given color </s>
|
funcom_train/36827193 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
//1. System retrieves list of user from client.
ClientComms c = UCStartup.getInstance().getClientComms();
ArrayList<String> list = new ArrayList<String>(c.getClientList());
//2. System displays client list.
gui2 = new ClientListView(list, man);
gui2.go();
c.monitorClientView(gui2);
}
COM: <s> use case controller displays a list of online users </s>
|
funcom_train/37202645 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMismatchedPasswords() {
byte[] sampleKey = "asdkjhsdkjfhsdf".getBytes();
LSIDAuth.init(sampleKey);
LSIDAuth auth = LSIDAuth.getInstance();
try {
String cryptedPassword = auth.createPassword("SecretPassword");
assertTrue("Passwords don't match!",
auth.comparePasswords(Base64.decode(cryptedPassword),
"SecretPassword"));
assertFalse("Passwords match!",
auth.comparePasswords(Base64.decode(cryptedPassword),
"AnotherSecretPassword"));
}
catch (Exception ex) {
ex.printStackTrace();
fail(ex.getMessage());
}
}
COM: <s> test that a correct password is recognized and an incorrect </s>
|
funcom_train/25395074 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFriction(double aStaticFriction, double aDynamicFriction, final boolean aAffectChildren) {
material.setStaticFriction(aStaticFriction);
material.setDynamicFriction(aDynamicFriction);
// propagate changes to children
if (aAffectChildren) {
for (JGenericObject children : childrens) {
children.setFriction(aStaticFriction, aDynamicFriction, aAffectChildren);
}
}
}
COM: <s> set the static and dynamic friction for this mesh possibly recursively </s>
|
funcom_train/50160371 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void getGlobalElements(Document doc, String location) {
if (doc == null) {
return;
}
List list = doc.selectNodes("/xsd:schema/xsd:element");
for (Iterator iter = list.iterator(); iter.hasNext(); ) {
Element element = (Element) iter.next();
String name = element.attributeValue("name");
GlobalElement g = new GlobalElement(element, location);
// System.out.println (g.toString());
try {
globalDefMap.setValue(name, g);
} catch (Exception e) {
prtln(e.getMessage());
}
}
}
COM: <s> gets the global elements attribute of the definition miner object </s>
|
funcom_train/44726924 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: synchronized public void addDependency (Dependency dependency) {
if (dependency == null) throw new NullPointerException("Invalid argument: dependency");
if (dependency.getDependentPlugin() != this)
throw new IllegalArgumentException("Dependency can only be applied to Plugin: " + dependency.getDependentPlugin());
if (dependency.isCompatible(this)) throw new IllegalArgumentException("Plugin cannot depend on itself.");
dependencies.put(dependency.resolveToPluginUID, dependency);
}
COM: <s> adds a dependency that represents a plugin that this plugin is dependent upon </s>
|
funcom_train/47867475 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int deserialize(byte[] payload) {
int offset = 0;
if (payload[offset] == 255) {
offset++;
length = ((payload[offset++] & 0xFF) << 8) + (payload[offset++] & 0xFF);
} else {
length = payload[offset++] & 0xFF;
}
if (length > payload.length)
throw new ArrayIndexOutOfBoundsException(length);
type = payload[offset++];
return offset;
}
COM: <s> parse the packet </s>
|
funcom_train/34479101 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected double pGetByIndexDouble(int index, int path) throws SdaiException {
// synchronized (syncObject) {
if (path == getCurrentSelectionNrByIndex(index)) {
return getByIndexDouble(index);
}
String base = SdaiSession.line_separator + AdditionalMessages.EB_SE_NC;
throw new SdaiException(SdaiException.SY_ERR, base);
// } // syncObject
}
COM: <s> given an index and select path number returns the element of double type </s>
|
funcom_train/35357364 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getLeft() {
return Math.min(this.p[0].getX(),
Math.min(this.p[1].getX(),
Math.min(this.p[2].getX(),
this.p[3].getX())));
}
COM: <s> get leftmost extent of quadrilateral </s>
|
funcom_train/21303084 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public XrefType cloneXrefType(XrefType xrefs) {
if (xrefs == null) { return null; }
XrefType clone = new XrefType();
clone.setPrimaryRef( cloneDbReferenceType(xrefs.getPrimaryRef()) );
for (DbReferenceType ref : xrefs.getSecondaryRef()) {
clone.getSecondaryRef().add( cloneDbReferenceType(ref) );
}
return clone;
}
COM: <s> clones a xref type object </s>
|
funcom_train/50353276 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
responseCode = in.readByte();
// TODO: We should try and guess the content type comming in
// so we can take an active part in reading it in
// as we do with the other reponse objects
result = in.readObject();
}
COM: <s> the object implements the read external method to restore its </s>
|
funcom_train/19088160 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InputStream getResourceAsStream(String name) {
if(getVariableResolver().canProcess(name))
{
name=getVariableResolver().resolveVariables(name);
}
// Try with the parent
InputStream is=null;
if(is==null) {
// Try with our custom classloader
is=findResourceStream(name);
}
if(m_usefallback && is==null)
{
getParent().getResourceAsStream(name);
}
return is;
}
COM: <s> redefines the class loader get resource as stream </s>
|
funcom_train/2288051 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUsersOrganizationalUnit(CmsObject cms, String ouFqn, String userName) throws CmsException {
CmsOrganizationalUnit orgUnit = readOrganizationalUnit(cms, ouFqn);
CmsUser user = cms.readUser(userName);
m_securityManager.setUsersOrganizationalUnit(cms.getRequestContext(), orgUnit, user);
}
COM: <s> moves an user to the given organizational unit </s>
|
funcom_train/2760901 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDataSource(DataSource dataSource) {
_dataSource = dataSource;
// create cache for context keys.
_cachedContextKeys = new HashMap();
_cachedWorks = new HashMap();
_cachedFlows = new HashMap();
_cachedSteps = new HashMap();
_cachedEvents = new HashMap();
_rootProgressOid = null;
_rootFlowProgressOid = null;
}
COM: <s> sets the datasource to use </s>
|
funcom_train/28754395 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setHybstarttime(String newVal) {
if ((newVal != null && this.hybstarttime != null && (newVal.compareTo(this.hybstarttime) == 0)) ||
(newVal == null && this.hybstarttime == null && hybstarttime_is_initialized)) {
return;
}
this.hybstarttime = newVal;
hybstarttime_is_modified = true;
hybstarttime_is_initialized = true;
}
COM: <s> setter method for hybstarttime </s>
|
funcom_train/7626362 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void set(int second, int minute, int hour, int monthDay, int month, int year) {
this.allDay = false;
this.second = second;
this.minute = minute;
this.hour = hour;
this.monthDay = monthDay;
this.month = month;
this.year = year;
this.weekDay = 0;
this.yearDay = 0;
this.isDst = -1;
this.gmtoff = 0;
}
COM: <s> sets the fields </s>
|
funcom_train/4231312 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void scale(Rectangle2D frame) {
Rectangle2D rect = getCellBounds();
double scalex = frame.getWidth() / rect.getWidth();
double scaley = frame.getHeight() / rect.getHeight();
double dx = frame.getX() - rect.getX();
double dy = frame.getY() - rect.getY();
scale(getAttributes().keySet(), scalex, scaley, dx, dy);
}
COM: <s> scales the graph bounds defined in code bounds code to fit into the </s>
|
funcom_train/20885190 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testElementWithFormat() {
ElementWithFormatTestDTO obj = new ElementWithFormatTestDTO();
obj.element = getDateForFormat("28.02.2007:15:21:27");
assertTrue(JSefaTestUtil.serialize(XML, obj).indexOf("28.02.2007:15:21:27") >= 0);
}
COM: <s> tests the format configuration for an element </s>
|
funcom_train/25828372 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void disableDataStatCollector() {
if (this.dataStatCollector != null) {
this.removePropertyChangeListener(this.dataStatCollector);
this.removeObjektInitEventListener(this.dataStatCollector);
this.removeDestroyObjektEventListener(this.dataStatCollector);
logLine("Disabled DataStatCollector.");
}
this.dataStatCollector = null;
}
COM: <s> disable the data stat collector and remove it as listener </s>
|
funcom_train/44329230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RefundTransactionResponseType refundTransaction(String _txnId, BasicAmountType _amount, String _memo, RefundPurposeTypeCodeType _type) throws RemoteException, ServiceException {
RefundTransactionRequestType request = new RefundTransactionRequestType();
request.setVersion("1.0");
request.setTransactionID(_txnId);
request.setAmount(_amount);
request.setMemo(_memo);
request.setRefundType(_type);
return refundTransaction(request);
}
COM: <s> performs a pay pal refund via api using the passed data </s>
|
funcom_train/17386478 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean disconnecting() {
Enumeration<ConnectionPlugin> e = connectionPlugins.elements();
while (e.hasMoreElements()) {
ConnectionPlugin plugin = (ConnectionPlugin) e.nextElement();
if (((ConnectionCallback) plugin.getCallback()).disconnecting(plugin.getData()) == false)
return false;
}
return true;
}
COM: <s> the bot is about to disconnect from the server </s>
|
funcom_train/38181852 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int nextInt() {
double u = rnd.nextDouble();
double uz = u * zetan;
if (uz < 1) return 0;
if (uz < 1 + Math.pow(0.5, theta)) return 1;
return (int) (numberOfElements * Math.pow(eta * u - eta + 1, alpha)) ;
}
COM: <s> returns next random integer according to zipf distribution with skew theta </s>
|
funcom_train/1910333 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getFitness(Individual i) {
if(i.isValid()) {
i.getFitness().setDouble(runFile(i.getPhenotype()));
} else {
i.getFitness().setDouble(((BasicFitness)i.getFitness()).getDefaultFitness());
}
}
COM: <s> evaluate an individual and set the fitness </s>
|
funcom_train/5306093 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RegularTimePeriod createInstance(Date millisecond, TimeZone zone) {
RegularTimePeriod result = null;
try {
Constructor c = this.periodClass.getDeclaredConstructor(
new Class[] {Date.class, TimeZone.class}
);
result = (RegularTimePeriod) c.newInstance(
new Object[] {millisecond, zone}
);
}
catch (Exception e) {
// do nothing
}
return result;
}
COM: <s> creates a time period that includes the specified millisecond assuming </s>
|
funcom_train/38528167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Structure parse(String input) {
log.debug("parse " + input);
initTable(input.length());
for (int i = 1; i < table.length; i++) {
char c = input.charAt(i - 1);
underparsePass(i, c);
parsePass(i, c);
overparsePass(i);
}
List l = Arrays.asList(table[table.length - 1]);
return maxHarmony(l);
}
COM: <s> parse the input string into a surface structure </s>
|
funcom_train/31290629 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public XmlCDataSection addCdata(final String data) {
final Document document = getOwnerDocument();
final Node node = document.createCDATASection(data);
final XmlCDataSection dataNode =
new XmlCDataSection(node, getNodeFactory());
appendChild(dataNode);
return dataNode;
}
COM: <s> create a new text within this node </s>
|
funcom_train/8688720 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void getTypeCommand(Commandline cmd) {
String typenm = null;
if (getTypeName() != null) {
typenm = getTypeName();
if (getVOB() != null) {
typenm += "@" + getVOB();
}
cmd.createArgument().setValue(typenm);
}
}
COM: <s> get the type name </s>
|
funcom_train/9352698 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void listenToAxis(final IAxis axis) {
axis.addPropertyChangeListener(IAxis.PROPERTY_ADD_REMOVE_TRACE, this);
axis.addPropertyChangeListener(IAxis.PROPERTY_LABELFORMATTER, this);
axis.addPropertyChangeListener(IAxis.PROPERTY_PAINTGRID, this);
axis.addPropertyChangeListener(IAxis.PROPERTY_RANGEPOLICY, this);
}
COM: <s> helper that adds this chart as a listener to the required property change </s>
|
funcom_train/42395952 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetNumJugadores() {
System.out.println("getNumJugadores");
Partida instance = new Partida();
int expResult = 0;
int result = instance.getNumJugadores();
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 num jugadores method of class model </s>
|
funcom_train/40338874 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPathExpressionNextMatchRecursive() {
GraphModel graph = new GraphModel();
GraphNode[] nodes = fillGraphModel(graph);
PathExpression pathExpression = createPathExpression(true, false, true);
Collection<GraphNode> output = pathExpression.nextMatch(graph,
buildSingleSet(nodes[0]));
assertEquals(2, output.size());
assertGraphContainsElement(output, nodes, 4);
assertGraphContainsElement(output, nodes, 6);
}
COM: <s> tests recursive version of </s>
|
funcom_train/18865577 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getPIPayment() {
if (len > 0 && n > 0 && m > 0 && P != null && I!= null) {
double i = getEffectiveInterestRate();
double p = P.doubleValue();
return p * (i / (1.0 - StrictMath.pow(1.0 + i, len * -1.0)));
}
return 0.0;
}
COM: <s> calculates the principal and interest payment of an equal payment series </s>
|
funcom_train/3888698 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addPropertyRefPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_TimeLimitType_propertyRef_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_TimeLimitType_propertyRef_feature", "_UI_TimeLimitType_type"),
ImsldV1p0Package.Literals.TIME_LIMIT_TYPE__PROPERTY_REF,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the property ref feature </s>
|
funcom_train/50851777 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isThisGood(Map levels) {
long total = 0;
for (Iterator i = levels.values().iterator(); i.hasNext(); ) {
Long level = (Long) i.next();
total += level.longValue();
}
return isThisScoreGood(score(total));
}
COM: <s> gets the this good attribute of the abstract rule object </s>
|
funcom_train/36247569 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void refreshPermissions() {
Display.getDefault().asyncExec(new Runnable() {
public void run() {
SecurityGroup selectedSecurityGroup = securityGroupSelectionComposite.getSelectedSecurityGroup();
if (selectedSecurityGroup == null) {
setInput(new ArrayList<IpPermission>());
return;
}
String groupName = selectedSecurityGroup.getGroupName();
new RefreshPermissionsThread(groupName).start();
}
});
}
COM: <s> refreshes the data in the permissions table </s>
|
funcom_train/4518542 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void registerLines(IIntervalRelation relation, int[] coords) {
for (int i = 0; i <= coords.length - 4; i += 2) {
_cache.add(new Line(relation, coords[i], coords[i + 1], coords[i + 2], coords[i + 3]));
}
}
COM: <s> register a line for later recognition </s>
|
funcom_train/27678701 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ImagePlus openTiff(InputStream in, String name) {
FileInfo[] info = null;
try {
TiffDecoder td = new TiffDecoder(in, name);
if (IJ.debugMode) td.enableDebugging();
info = td.getTiffInfo();
} catch (FileNotFoundException e) {
IJ.showMessage("TiffDecoder", "File not found: "+e.getMessage());
return null;
} catch (Exception e) {
IJ.showMessage("TiffDecoder", ""+e);
return null;
}
return openTiff2(info);
}
COM: <s> attempts to open the specified input stream as a </s>
|
funcom_train/20636940 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JRadioButton getTabLeftRbn() {
if (rbnTabLeft == null) {
rbnTabLeft = new JRadioButton("Left Tabbed Pane", true);
rbnTabLeft.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
actionPerformed_rbnTabLeft(e);
}
});
}
return rbnTabLeft;
}
COM: <s> get left tabbed pane radio button </s>
|
funcom_train/28715477 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected AbstractContent findOccurence(int startFrame, int column) {
AbstractContent auxResult = null;
Object aux;
for (Iterator i = allControls.iterator(); i.hasNext();) {
aux = i.next();
if (aux instanceof AbstractContent) {
auxResult = (AbstractContent) aux;
if ((auxResult.getColumn() == column)
&& (auxResult.getStartFrame() == startFrame)) {
return auxResult;
}
}
}
return null;
}
COM: <s> finds the occurence in the specified column start frame </s>
|
funcom_train/35837699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addSeparator() {
int ori = JSeparator.HORIZONTAL;
if (getOrientation() == SwingConstants.VERTICAL)
ori = JSeparator.VERTICAL;
UIToolBar.Separator s = new UIToolBar.Separator();
s.setAlignmentX(0);
Dimension dim = s.getPreferredSize();
s.setOrientation(ori);
if (getOrientation() == SwingConstants.VERTICAL)
s.setSeparatorSize(new Dimension(dim.height, dim.width));
add(s);
}
COM: <s> appends a separator of default size to the end of the tool bar </s>
|
funcom_train/33281848 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int jsxGet_clientWidth() {
final boolean includePadding =
!getBrowserVersion().hasFeature(BrowserVersionFeatures.JS_ELEMENT_EXTENT_WITHOUT_PADDING);
final ComputedCSSStyleDeclaration style = getWindow().jsxFunction_getComputedStyle(this, null);
return style.getCalculatedWidth(false, includePadding);
}
COM: <s> returns client width attribute </s>
|
funcom_train/45692243 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addStretchStepPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Sample_stretchStep_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Sample_stretchStep_feature", "_UI_Sample_type"),
EsxPackage.Literals.SAMPLE__STRETCH_STEP,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the stretch step feature </s>
|
funcom_train/7751680 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSocket(String address, String port, int socketTimeout){
try{
socket = new Socket(address, Integer.parseInt(port));
socket.setSoTimeout(socketTimeout);
setSocketReader( new BufferedReader(
new InputStreamReader(socket.getInputStream())));
setOutputStream(
new PrintStream(
new BufferedOutputStream(
socket.getOutputStream()
)
)
);
}
catch (Exception e) {
e.printStackTrace();
}
}
COM: <s> set the socket buffered reader and buffered writer </s>
|
funcom_train/23411332 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDependant1PropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_NetworkDependency_Dependant1_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_NetworkDependency_Dependant1_feature", "_UI_NetworkDependency_type"),
OMPackage.Literals.NETWORK_DEPENDENCY__DEPENDANT1,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the dependant1 feature </s>
|
funcom_train/25566887 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Action createAction(Command command, ControlBuilder cb, SwingApplicationView view){
String actionCommand = cb.getActionCommand(command);
if(actionCommand==null)return null;
ApplicationAction action = new EasyApplicationCommandAction(command, view.getResource(),
actionCommand, cb.getMnemonic(command), cb.hasIcon(command));
action.setView(view);
return action;
}
COM: <s> by default mnemonic index 0 and rollover icon null </s>
|
funcom_train/28870473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JPanel getOptionsPanel() {
JPanel allOptions = new JPanel();
allOptions.setLayout(new GridLayout(10, 1));
//allOptions.setLayout(new BorderLayout());
allOptions.add(visualSetStepSize());
allOptions.add(new JPanel()); //filler so there is blank space
return allOptions;
}
COM: <s> this function creates the actual options panel </s>
|
funcom_train/5679884 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addProductiveNodes(LookupResults theResults, Set nodesToConnect) {
// Connect to this, if not already a neighbor
LookupResult[] results = theResults.getResults();
for (int i = 0; i < results.length; i++) {
Node productiveNode = results[i].getItem().getDescription()
.getNode();
nodesToConnect.add(productiveNode);
}
}
COM: <s> add the nodes that provided results to the list of neighbors </s>
|
funcom_train/38828380 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int skipDelimiters(int startPos) {
if (Text.EMPTY.equals(_delimiters)) return _maxPosition;
int position = startPos;
while (!_retDelims && position < _maxPosition) {
char c = _text.charAt(position);
if ( (c > _maxDelimChar) || (_delimiters.indexOf(c,0) < 0) )
break;
position++;
if (_returnEmptyTokens)
break;
}
return position;
}
COM: <s> skips delimiters starting from the specified position </s>
|
funcom_train/43326626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final static public Alignment makeFromSuperpositionDP(Protein seq, Protein fold) {
int i,j;
// make default alignment using N-W with distance
// dependent scoring.
GapModel gm = new GapConstant(0.0,
true,
true);
ScoreList sl = new ScoreList(new ScorePairwiseDistance());
Alignment al = seq.getGlobalAlignment(fold,
new AlignmentParameters(gm, sl),
null);
// process out all bad alignments.
al.filterByDistance();
al.filterByLength();
return al;
}
COM: <s> make from a superposition using dynamic programming </s>
|
funcom_train/48213414 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object applyJavaToJdbcMappings(Object x) {
// Convert java dates to sql dates.
if (x instanceof java.util.Date) {
if (x == null) {
return (java.sql.Date) null;
} else {
return new java.sql.Date(((java.util.Date)x).getTime());
}
// No conversion necessary. Return the original object.
} else {
return x;
}
}
COM: <s> most database drivers mess up with the date conversions </s>
|
funcom_train/5362446 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(KeyObject key) {
if (key instanceof DoubleKey) {
double comp = m_key - ((DoubleKey) key).m_key;
if (comp == 0) {
return KEY_EQUAL;
} else if (comp < 0) {
return KEY_LESS;
} else {
return KEY_MORE;
}
} else {
return KEY_ERROR;
}
}
COM: <s> compares the invoking code double key code to code key code </s>
|
funcom_train/9042838 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Process execute(String[] cmd, String[] environment) {
try {
if (workDir == null)
return Runtime.getRuntime().exec(cmd, environment);
else
return Runtime.getRuntime().exec(cmd, environment, workDir);
} catch (java.io.IOException e) {
}
return null;
}
COM: <s> start the process </s>
|
funcom_train/29290059 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateQuestionType(QuestionTypeCMPData data) throws EJBException {
try {
QuestionTypeCMPLocal qestionTypeLocal = getQuestionTypeCMPLocalHome()
.findByPrimaryKey(data.getQuestion_type_id());
qestionTypeLocal.setType_name(data.getType_name());
qestionTypeLocal.setDescription(data.getDescription());
} catch (FinderException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
COM: <s> update question type business method </s>
|
funcom_train/23232528 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Point tileToScreenCoords(double x, double y) {
double xx = getWidthBetweenHexCentres() * x;
double yy = getTileHeight() * y;
if (x % 2 == 0) {
yy += getTileHeight() / 2;
}
return new Point((int)(xx * zoom), (int)(yy * zoom));
}
COM: <s> returns the location on screen for the given tile </s>
|
funcom_train/41266298 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(Mngtdc entity) {
EntityManagerHelper.log("deleting Mngtdc instance", Level.INFO, null);
try {
entity = getEntityManager().getReference(Mngtdc.class,
entity.getId());
getEntityManager().remove(entity);
EntityManagerHelper.log("delete successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("delete failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> delete a persistent mngtdc entity </s>
|
funcom_train/39912880 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetEh12() {
System.out.println("setEh12");
TextField tf = null;
Page1 instance = new Page1();
instance.setEh12(tf);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set eh12 method of class timesheetmanagement </s>
|
funcom_train/24117029 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeLink(AbstractResource resource) throws IllegalArgumentException{
// argument check
if(resource == null) {
throw new IllegalArgumentException("resource to remove link from must not be NULL!");
}
// insert relation if not already known
this.neighbors.remove(resource.getResId());
resource.neighbors.remove(this.getResId());
}
COM: <s> removes a link between this and the given resource </s>
|
funcom_train/31679443 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parse(Reader reader) throws IOException, SAXException {
try {
_xmlReader.setInput(reader);
parseAll();
} catch (XMLStreamException e) {
if (e.getNestedException() instanceof IOException)
throw (IOException)e.getNestedException();
throw new SAXException(e);
} finally {
_xmlReader.reset();
}
}
COM: <s> parses an xml document using the specified reader </s>
|
funcom_train/4805239 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getSchema(Attributes attributes) throws SAXException {
String schemaUri = attributes.getValue("", "schema");
if ("".equals(schemaUri)) {
error("no_schema");
schemaUri = null;
}
if (schemaUri != null) {
if (Uri.hasFragmentId(schemaUri))
error("schema_fragment_id");
return schemaUri;
}
return null;
}
COM: <s> get the uri specified by a schema attribute and if we have a </s>
|
funcom_train/5713210 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInitialization(){
NCCI ncci = new NCCI(0xffffeedd);
assertEquals("check ncci", 0xffff, ncci.getNcciValue());
assertEquals("check plci", new PLCI(0xeedd), ncci.getPlci());
assertEquals("check controller", new Controller(0xdd), ncci.getController());
}
COM: <s> test the correct behavior when initializing with the non standard constructor </s>
|
funcom_train/46055820 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showChange(List result) {
if (printstatus != change) {
ChangeInfo info = new ChangeInfo(ChangeInfo.CHANGE, printoldline, printoldline);
setLast(info, result);
}
printstatus = change;
lines.add(oldInfo.symbol[printoldline].getSymbol());
anyprinted = true;
printoldline++;
}
COM: <s> showchange part of printout </s>
|
funcom_train/16531836 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void hideTestButton() {
Component[] toolbarComponents = blueJExerciseButtonRow.getComponents();
//loop through all the components in the toolbar
for(int x=0; x<toolbarComponents.length; x++) {
if(toolbarComponents[x] instanceof JButton) {
JButton button = (JButton) toolbarComponents[x];
//find the button that is labelled "Test"
if(button.getText().equals("Test")) {
//hide the button
button.setVisible(false);
}
}
}
}
COM: <s> remove the test button from the display so users will not be </s>
|
funcom_train/46377669 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public interface AvatarInUseListener {
/**
* Indicates that a new avatar is in use. The 'isLocal' parameter tells
* whether the change should only be uplodated locally.
*
* @param avatar The avatar in use
* @param isLocal True if the avatar update should only happen locally
*/
public void avatarInUse(AvatarSPI avatar, boolean isLocal);
}
COM: <s> a listener indicates that a change in the avatar currently in use </s>
|
funcom_train/10384064 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSessionAttribute( String sessionId, String key ) {
Session s = sessions.get(sessionId);
if( s==null ) {
if(log.isInfoEnabled())
log.info("Session not found " + sessionId);
return null;
}
Object o=s.getSession().getAttribute(key);
if( o==null ) return null;
return o.toString();
}
COM: <s> for debugging get a session attribute </s>
|
funcom_train/14009173 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Boolean arrayContains(Object array, Object element) {
int size = this.size(array).intValue();
for (int index = 0; index < size; ++index) {
if (this.equals(element, this.getFromArray(array, index))) {
return Boolean.TRUE;
}
}
return Boolean.FALSE;
}
COM: <s> checks if an array contains a certain element </s>
|
funcom_train/5384959 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean dropTargetValidate(DropTargetEvent event, File targetFile) {
if (targetFile != null && targetFile.isDirectory()) {
if (event.detail != DND.DROP_COPY && event.detail != DND.DROP_MOVE) {
event.detail = DND.DROP_MOVE;
}
} else {
event.detail = DND.DROP_NONE;
}
return event.detail != DND.DROP_NONE;
}
COM: <s> validates a drop target as a candidate for a drop operation </s>
|
funcom_train/31118723 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public String getChildTextNode(Node n) {
NodeList nl = n.getChildNodes();
for (int a = 0; a < nl.getLength(); a++) {
Node nn = nl.item(a);
if (nn.getNodeName().equals("#text")) {
return nn.getNodeValue();
}
}
// System.out.println("cannot find text in node");
return null;
}
COM: <s> gets the text node value of an xml node </s>
|
funcom_train/1216975 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Employee getEmployee(Element empEl) {
//for each <employee> element get text or int values of
//name ,id, age and name
String name = getTextValue(empEl,"Name");
int id = getIntValue(empEl,"Id");
int age = getIntValue(empEl,"Age");
String type = empEl.getAttribute("type");
//Create a new Employee with the value read from the xml nodes
Employee e = new Employee(name,id,age,type);
return e;
}
COM: <s> i take an employee element and read the values in create </s>
|
funcom_train/23021017 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getAuthToken(String username, String password, String captchaToken, String captchaAnswer, String serviceName, String applicationName) throws AuthenticationException {
GoogleAuthTokenFactory googleAuthTokenFactory = getGoogleAuthTokenFactory();
return googleAuthTokenFactory.getAuthToken(username, password, captchaToken, captchaAnswer, serviceName, applicationName);
}
COM: <s> retrieves the authentication token for the provided set of credentials </s>
|
funcom_train/8716033 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ByteBuffer getData() {
ByteBuffer buf = ByteBuffer.allocate(262);
buf.putShort(getFormat());
buf.putShort(getLength());
buf.putShort(getLanguage());
buf.put(getMap());
// reset the position to the beginning of the buffer
buf.flip();
return buf;
}
COM: <s> get the data in this map as a byte buffer </s>
|
funcom_train/33944221 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFormulaServicePercent() {
String formula = "15 phd + <A2>";
double realResult = 2.15;
HashMap argumentMap = new HashMap();
argumentMap.put("<A2>",new Double(2));
argumentMap.put("<B2>",new Double(3));
argumentMap.put("<C2>",new Double(4));
formula(formula,realResult,argumentMap);
}
COM: <s> test the formula service for percent </s>
|
funcom_train/21974723 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateSymbols(){
for(int i = 0; i < size(); i++){
EdaPart part = get(i);
//part.setSourceDocument(null);
//System.out.println("EdaPartList.updateSymbols updating part id: "+part.getId()+" from source: " + part.getSourceDocumentPath());
part.loadFromSourceDocument();
//part.updateSymbolsFromSource();
}
}
COM: <s> updates the symbols of all of the parts </s>
|
funcom_train/29645636 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addTestClasses(List classNames) {
for (Iterator i = classNames.iterator(); i.hasNext();) {
String className = (String)i.next();
try {
addTestSuite(Class.forName(className));
} catch (ClassNotFoundException ex) {
System.out.println("Cannot find test class " + className);
}
}
}
COM: <s> adds all test classes from the specified list to this test </s>
|
funcom_train/34671034 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(List<Triple> triples, boolean flush) {
for (int i = 0; i < m_writers.length; i++) {
try {
m_writers[i].add(triples, flush);
} catch (Exception e) {
logger.warn("Error adding triples from list (" + m_writers[i].getClass().getName() + ")", e);
}
}
}
COM: <s> immediately add all triples in the list to the store then return </s>
|
funcom_train/7623047 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setScaleType(ScaleType scaleType) {
if (scaleType == null) {
throw new NullPointerException();
}
if (mScaleType != scaleType) {
mScaleType = scaleType;
setWillNotCacheDrawing(mScaleType == ScaleType.CENTER);
requestLayout();
invalidate();
}
}
COM: <s> controls how the image should be resized or moved to match the size </s>
|
funcom_train/37433310 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void doStatus(Status s, Object[] args) {
Object[] listeners = listenerList.getListenerList();
for (int i = listeners.length - 2; i >= 0; i -= 2) {
if (listeners[i] == IOHandlerListener.class) {
((IOHandlerListener) listeners[i + 1]).onStatus(this, s, args);
}
}
}
COM: <s> fires an on status event to all registered listeners </s>
|
funcom_train/3525171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireEnableChange(EnableEvent e) {
if (enableListeners != null) {
Vector listeners = enableListeners;
int count = listeners.size();
for (int i = 0; i < count; i++) {
((EnableListener) listeners.elementAt(i)).enableChange(e);
}
}
}
COM: <s> notify the listeners that the enabled state has changed </s>
|
funcom_train/51406397 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double getFleschKincaidGradelLevelIncludingFragments() {
double fleschKincaidGradeLevel = 0.0;
fleschKincaidGradeLevel = ((0.39 * ((double) wordsInFile / (double) sentencesInFile)) + (11.8 * getSyllablesPerWordInFile())) - 15.59;
if (fleschKincaidGradeLevel < 0) {
fleschKincaidGradeLevel = 0;
}
return fleschKincaidGradeLevel;
}
COM: <s> calculate and return the files flesch kincaid grade level score including </s>
|
funcom_train/17343021 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
return "[PenEvent " + PenEvent.getTypeString(type) + " pt: " + Debug.num(pt) +
" prevPt: " + Debug.num(ptPrevious) + " flowPt: " + Debug.num(ptFlow) + " fsPhase: " + Debug.num(fsPhase) + "]";
}
COM: <s> returns a nicely formatted debugging string </s>
|
funcom_train/38513217 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Object o) {
if (o instanceof MessageEntry) {
MessageEntry me = (MessageEntry)o;
if (me.getKind() == getKind()) {
return 0;
}
return (me.getKind() > getKind()) ? -1 : 1;
}
return 0;
}
COM: <s> compares this object with the specified object for order </s>
|
funcom_train/48338144 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void acquire() {
synchronized (lock) {
if (ACTIVATING != status) {
return;
}
// Set up time update notification.
if (null == timeUpdate) {
timeUpdate = timer.schedule(Timer.FIXED_RATE,
SystemUtilities.currentTimeMillis(),
Duration.SECOND,
new TimeUpdateHandler(),
new DynamicTuple());
}
}
start();
}
COM: <s> acquire the resources needed by the clock application </s>
|
funcom_train/31688498 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getCurrentPageId() {
Element pageEl =
XMLUtils.getFirstNamedChild(getDocumentElement(), WebPageBinding.TAG_REQUESTED_PAGE);
int nId = -1;
if (pageEl != null && pageEl.getAttribute(HarmoniseObjectBinding.ATTRIB_ID)!=null && !pageEl.getAttribute(HarmoniseObjectBinding.ATTRIB_ID).equals("")) {
nId =
Integer.parseInt(pageEl.getAttribute(HarmoniseObjectBinding.ATTRIB_ID));
}
return nId;
}
COM: <s> returns the current webpage id found in the state </s>
|
funcom_train/17893215 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Method findTestMethod(String propertyName) {
Method checker = null;
try {
Method candidate = getSubject().getClass().getMethod(INITL_TEST_NAME_WORD + propertyName, new Class[0]);
if(getTestReturnClass().isAssignableFrom(candidate.getReturnType())) {
checker = candidate;
}
} catch(NoSuchMethodException e) {
/* we're genuinely swallowing this one */
}
return checker;
}
COM: <s> find the associated test method for this property </s>
|
funcom_train/31871956 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public class FrameWCOM extends FrameW {
public String getLongName () { return "Commercial URL frame"; }
public FrameWCOM (ID3V2Frame frm) {
super (frm);
}
public FrameWCOM (ID3V2Frame frm, DataSource ds)
throws SeekPastEndException {
super (frm, ds);
}
public String toString () {
return getLongName () + "\nURL : "
+ url;
}
}
COM: <s> commercial url frame </s>
|
funcom_train/3026776 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent evt) {
int item = list.getSelectedIndex();
if (item == -1) {
return;
}
int newPos = item + direction;
if ((newPos < 0) || (newPos >= olm.getSize())) {
return;
}
olm.swap(item, newPos);
list.setSelectedIndex(newPos);
}
COM: <s> swap the items on the users command </s>
|
funcom_train/38808030 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void pushElement(Element element) {
if (atRoot) {
document.setRootElement(element); // XXX should we use a factory
// call?
atRoot = false;
} else {
factory.addContent(currentElement, element);
}
// FIXMEDOM ________________________good assert ?
// assert element != null;
currentElement = element;
}
COM: <s> pushes an element onto the tree under construction </s>
|
funcom_train/28297865 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getNextTarget(TransSibGameState game,int player) {
if (game!=null) {
int[] cards=game.getPlayerCards(player);
if (cards!=null) {
int node=getMinDistance(game,player,cards);
if (node>=0) return node;
}
}
return -1;
}
COM: <s> returns the next nearest target city </s>
|
funcom_train/3720973 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setIdentifier(String identifier) throws ProfileException {
String oldIdentifier = this.identifier;
try {
vetoableChangeSupport.fireVetoableChange("identifier", oldIdentifier, identifier);
} catch (Exception e) {
throw new ProfileException(null, e);
}
this.identifier = identifier;
propertyChangeSupport.firePropertyChange("identifier", oldIdentifier, identifier);
}
COM: <s> setter for property identifier </s>
|
funcom_train/41151600 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write() {
Enumeration enm;
String key;
enm = m_Filenames.keys();
while (enm.hasMoreElements()) {
key = (String) enm.nextElement();
CollectiveHelper.writeToTempFile(getFilename(key), getValues(key), true);
setValues(key, "");
}
}
COM: <s> writes all the currently stored values to the associated files </s>
|
funcom_train/5551635 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void reduce() {
// reduce numerator and denominator by greatest common denominator.
int d = MathUtils.gcd(numerator, denominator);
if (d > 1) {
numerator /= d;
denominator /= d;
}
// move sign to numerator.
if (denominator < 0) {
numerator *= -1;
denominator *= -1;
}
}
COM: <s> reduce this fraction to lowest terms </s>
|
funcom_train/19080995 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void replay(int eventOption, boolean raiseEvent) {
for (int index = 0; index < targetList.size(); index++) {
StackManager.getInstance().getTargetedList().addTarget(eventOption,
targetList.get(index), testList.get(index), raiseEvent);
}
}
COM: <s> replay the target list operation </s>
|
funcom_train/18745021 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int compareToEdge(Edge other) {
int result;
result = source().compareTo(other.source());
if (result != 0) {
return result;
}
result = label().compareTo(other.label());
if (result != 0) {
return result;
}
result = target().compareTo(other.target());
return result;
}
COM: <s> compares this edge to another edge </s>
|
funcom_train/8525634 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeHttpService(String name) {
HttpService service = serviceMap.remove(name);
if (service != null) {
LOG.debug("HttpService {} with key '{}' was removed", service, name);
} else {
LOG.warn("HttpService with name {} wasn't found for removing", name);
}
}
COM: <s> remove an code http service code which was previously added </s>
|
funcom_train/15407006 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void externalModification(TransactionEventTable tableEvents) {
TransactionEvent event = new TransactionEvent();
event.add(tableEvents);
PostCommitProcessing postCommit = new PostCommitProcessing(clusterManager, this, null, event);
// invalidate parts of local cache and index
postCommit.notifyLocalCacheIndex();
backgroundExecutor.execute(postCommit.notifyPersistListeners());
}
COM: <s> process a transaction that comes from another framework or local code </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.