__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/50167528 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean containsTerm(String identifier) {
int numberOfTerms = terms.size();
for ( int i = 0; i < numberOfTerms; i++) {
OntologyTermProvenance currentTerm
= (OntologyTermProvenance) terms.get(i);
OntologyTermMetaData ontologyTermMetaData
= currentTerm.getOntologyTermMetaData();
String currentIdentifier
= ontologyTermMetaData.getIdentifier();
if ( currentIdentifier.equals(identifier) == true) {
return true;
} //end if ()
} // end for ()
return false;
}
COM: <s> searches for term amongst all terms document wide </s>
|
funcom_train/21458019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unAssign(int id) {
PreparedStatement psUpdate = null;
try {
psUpdate = conn.prepareStatement("update resource set Status='Unassigned'" + " where Resource_ID = " + id);
psUpdate.executeUpdate();
conn.commit();
} catch (SQLException sqle) {
sqle.printStackTrace();
}
}//end unAssign
COM: <s> changes the status of a resource to unassigned </s>
|
funcom_train/17396612 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addMaxTimeNsPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Metrics_maxTimeNs_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Metrics_maxTimeNs_feature", "_UI_Metrics_type"),
TracePackage.Literals.METRICS__MAX_TIME_NS,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the max time ns feature </s>
|
funcom_train/20154330 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cmdUse(User teller, StringBuffer cmd) {
/* Note: When the command dispatcher sees a StringBuffer parameter, it will pass the entire remaining line of text. */
if (!userService.isUserInRole(teller, managerRole)) {
command.tell(teller, "Sorry, this command is restricted to managers.");
return;
}
command.sendCommand(cmd.toString());
}
COM: <s> instructs the bot to issue the attached command to the server </s>
|
funcom_train/1548121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double apply(double[] pX, double[] pY, double[][] coeff) {
double result = 0;
for (int i = 0; i < N; i++) {
for (int j = 0; j < N; j++) {
result += coeff[i][j] * pX[i] * pY[j];
}
}
return result;
}
COM: <s> compute the value of the bicubic polynomial </s>
|
funcom_train/5379398 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireTreeCollapsed(final TreeExpansionEvent event) {
Object[] listeners = treeListeners.getListeners();
for (int i = 0; i < listeners.length; ++i) {
final ITreeViewerListener l = (ITreeViewerListener) listeners[i];
SafeRunnable.run(new SafeRunnable() {
public void run() {
l.treeCollapsed(event);
}
});
}
}
COM: <s> fires a tree collapsed event </s>
|
funcom_train/51206761 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection listAllPersonnes() throws EJBException {
System.out.println("listing all personnes ");
Collection<PersonneValue> personnesValue = new ArrayList<PersonneValue>();
try {
Collection personnes = getPersonneHome().findAll();
for (Iterator iter = personnes.iterator(); iter.hasNext();) {
PersonneLocal personneLocal = (PersonneLocal) iter.next();
personnesValue.add(personneLocal.getPersonneValue());
}
} catch (FinderException e) {
throw new EJBException(e);
}
return personnesValue;
}
COM: <s> business method list all personnes </s>
|
funcom_train/11721776 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean evaluate(Object item) {
if ( item instanceof Item ) {
try {
final int depth = ((Item)item).getDepth();
return depth >= minDepth && depth <= maxDepth && matches((Item)item);
} catch (RepositoryException re) {
return false;
}
}
return false;
}
COM: <s> matches if the given depth is greater or equal the minimum depth and </s>
|
funcom_train/3527009 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkPreconditions(String resourcePath, int depth) throws PreconditionViolationException, ServiceAccessException {
if (depth != 0) {
throw new PreconditionViolationException(
new ViolatedPrecondition("depth-must-be-zero",
WebdavStatus.SC_BAD_REQUEST,
"This report is only defined for depth=0."),
resourcePath
);
}
}
COM: <s> method check preconditions </s>
|
funcom_train/39398062 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Message readMessage() throws ServerCommunicationException {
try {
if (xmlInputStream == null) throw new ServerCommunicationException("The Server is not connected");
Message read = (Message)xmlInputStream.readObject();
if (read == null) throw new IOException("Reading from socket timed out.");
return read;
} catch (IOException e) {
throw new ServerCommunicationException("Reading from the server timed out.",e);
}
}
COM: <s> receives a message from the server </s>
|
funcom_train/18744451 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setId(Aspect id) throws FormatException {
assert id.getKind() == ID : String.format(
"Aspect %s is not an identifier", id);
if (this.id != null) {
throw new FormatException("Duplicate node identifier");
}
this.id = id;
}
COM: <s> sets the identifier aspect of this node </s>
|
funcom_train/3372147 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void loadChildren(ViewFactory f) {
if (f == null) {
// No factory. This most likely indicates the parent view
// has changed out from under us, bail!
return;
}
Element e = getElement();
int n = e.getElementCount();
if (n > 0) {
View[] added = new View[n];
for (int i = 0; i < n; i++) {
added[i] = f.create(e.getElement(i));
}
replace(0, 0, added);
}
}
COM: <s> loads all of the children to initialize the view </s>
|
funcom_train/32613690 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addSubjectStatement(Triple triple){
// Adds the given Triple to the list of Triple instances
ensureTransients();
statements.add(triple);
Set nodes = (Set)properties.get(triple._predicate());
if (nodes == null){
nodes = new LinkedHashSet();
properties.put(triple._predicate(), nodes);
}
nodes.add(triple._object());
}
COM: <s> adds the given triple instance to the list of statements </s>
|
funcom_train/19072678 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean newCycle() {
boolean retValue = false;
if (isApplyEveryCycle()) {
retValue = apply();
}
if (getNextPlugIn() != null) {
ConverterPlugIn myPlugIn = (ConverterPlugIn)getNextPlugIn();
myPlugIn.setInputVector(getInputVector());
retValue = myPlugIn.newCycle() | retValue;
}
return retValue;
}
COM: <s> this method is called at the start of a new cycle and </s>
|
funcom_train/5063745 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void disconnected() {
// We can ignore the host/port we get, since that should
String oldHost = activeHost;
int oldPort = activePort;
activeSocket = null;
activeHost = "";
activePort = -1;
activeAppID = -1;
Iterator iterator = connListener.iterator();
while (iterator.hasNext()) {
((SKJConnectionStatusListener) iterator.next()).llcDisconnected(
oldHost, oldPort);
}
}
COM: <s> updates the connection status information when this connection breaks </s>
|
funcom_train/10948636 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSortArray() {
File[] files = new File[3];
files[0] = equalFile1;
files[1] = moreFile;
files[2] = lessFile;
comparator.sort(files);
assertSame("equal", lessFile, files[0]);
assertSame("less", equalFile1, files[1]);
assertSame("more", moreFile, files[2]);
}
COM: <s> test the comparator array sort </s>
|
funcom_train/17201846 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void computeImplicitBackwardDependencesUse(Register r, DepGraphNode destNode) {
DepGraphNode sourceNode = r.dNode();
if (sourceNode != null) {
// create antidependence edge.
// NOTE: sourceNode contains the def and destNode contains the use.
destNode.insertOutEdge(sourceNode, REG_ANTI);
}
}
COM: <s> compute implicit backward dependences from a given register use </s>
|
funcom_train/9489117 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public Ggb3DVector intersectLinePlane(Ggb3DMatrix line, Ggb3DMatrix plane){
Ggb3DVector v = line.getColumn(1);
Ggb3DVector v1 = plane.getColumn(1);
Ggb3DVector v2 = plane.getColumn(2);
Ggb3DVector vn = v1.crossProduct(v2);
// if v is orthogonal to vn, v is parallel to the plane and so the line is
if (Kernel.isEqual(vn.dotproduct(v),0,Kernel.STANDARD_PRECISION))
return null;
// project the origin of the line on the plane (along v direction)
Ggb3DVector o = line.getColumn(2);
return o.projectPlaneThruV(plane, v)[0];
}
COM: <s> return the point p intersection of the line and the plane </s>
|
funcom_train/14083870 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void init( String password ) {
TwofishEngine engine = new TwofishEngine();
PKCS12ParametersGenerator generator =
new PKCS12ParametersGenerator( new SHA1Digest() );
generator.init( password.getBytes(), null, PBE_ITERATION );
cipherParams = generator.generateDerivedParameters( KEY_SIZE,
engine.getBlockSize() * 8 );
CBCBlockCipher cbc = new CBCBlockCipher( engine );
cipher = new PaddedBufferedBlockCipher( cbc );
}
COM: <s> init the cipher </s>
|
funcom_train/47135411 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ContactHeader getContactHeader() {
try {
return headerFactory.createContactHeader(
addressFactory.createAddress(
"sip:"+localhost.getHostAddress()+
":" + sipProvider.getListeningPoint(ListeningPoint.UDP).getPort()));
} catch( Exception e ) {
e.printStackTrace();
}
return null;
}
COM: <s> helper method to create a contact header for the local user </s>
|
funcom_train/35541782 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFixedOccurs() {
parseAndCheck(
" 01 myName OCCURS 3."
,
"(DATA_ITEM (LEVEL 01) (NAME myName) (FIXEDARRAY (HBOUND 3)))");
parseAndCheck(
" 01 myName OCCURS 3 TIMES."
,
"(DATA_ITEM (LEVEL 01) (NAME myName) (FIXEDARRAY (HBOUND 3)))");
}
COM: <s> test fixed length table clause </s>
|
funcom_train/3830365 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public char getTupleSeperator() {
Debug.debugMethodBegin( this, "getTupleSeperator()" );
char ts = DEFAULT_TS;
if ( XMLTools.getAttrValue( element, "ts" ) != null ) {
String s = XMLTools.getAttrValue( element, "ts" );
ts = s.charAt( 0 );
}
Debug.debugMethodEnd();
return ts;
}
COM: <s> return the character used as tuple seperator </s>
|
funcom_train/6487304 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ResultSet executeQuery(String query) throws Exception {
ResultSet rs=null;
try {
Connection con=getConnection();
Statement st=con.createStatement();
rs=st.executeQuery(query);
}
catch (SQLException ex) {
System.out.println("An error occured while executing the following query:");
System.out.println(" "+query);
System.out.println(" "+ex);
throw new Exception("An error occured querying the database.");
}
catch (Exception ex) {
throw new Exception("An error occured querying the database:\n"+ex);
}
return rs;
}
COM: <s> executes the given query to the database and returns the </s>
|
funcom_train/3302828 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getText() {
StringBuffer buffer=new StringBuffer();
for (Node iter=firstChild;iter!=null;iter=iter.followingSibling) {
if (iter instanceof Element) {
buffer.append(((Element)iter).getText());
} else if (iter instanceof Text) {
buffer.append(((Text)iter).text);
}
}
return buffer.toString();
}
COM: <s> get all contained text </s>
|
funcom_train/16303309 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FormatConverter getConverter(ModelType modelType) throws CoreException,IllegalArgumentException {
FormatConverter converter = null;
final LazyConverterHolder holder = (LazyConverterHolder)converters.get(modelType);
if(holder != null){
try {
converter = holder.getInstance();
} catch(IllegalAccessException iae){
throw createCoreException(ConverterManagerMessages.error_illegalaccess,iae);
} catch(InstantiationException ie){
throw createCoreException(ConverterManagerMessages.error_instantiation,ie);
}
} else {
throw new IllegalArgumentException(
ConverterManagerMessages.bind(ConverterManagerMessages.error_noformatconverter,modelType.getLabel())
);
}
return(converter);
}
COM: <s> used to retrieve the specified converter </s>
|
funcom_train/28887322 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean accept(File pathname) {
try {
if (pathname.isFile() && !pathname.getCanonicalPath().equals("")) {
if (pathname.getCanonicalPath().toLowerCase().endsWith("jpg")) {
return true;
}
}
} catch (IOException e) {
e.printStackTrace();
}
return false;
}
COM: <s> excepts ending of jpg </s>
|
funcom_train/28964958 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void forkTalkRun() {
streamContext.reset(this);
while (streamContext.hasMore()) {
streamContext.advance(); // wait/yield is in here
IEvent value = (IEvent) expression.getTupleValue(streamContext);
if (value != null) {
streamContext.addEvent(value); // adds event to this but also remembers it for forktalk purposes
}
}
}
COM: <s> run method for streams derived from fork talk methods </s>
|
funcom_train/35280408 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resetLocations(){
// NOTE: Shader sources will be reset seperately from the shader itself.
for (Uniform uniform : uniforms.values()){
uniform.reset(); // fixes issue with re-initialization
}
for (Entry<Attribute> entry : attribs){
entry.getValue().location = -2;
}
}
COM: <s> usually called when the shader itself changes or during any </s>
|
funcom_train/12526650 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TypeVariableBinding original() {
if (this.declaringElement.kind() == Binding.METHOD) {
MethodBinding originalMethod = ((MethodBinding)this.declaringElement).original();
if (originalMethod != this.declaringElement) {
return originalMethod.typeVariables[this.rank];
}
} else {
ReferenceBinding originalType = (ReferenceBinding)((ReferenceBinding)this.declaringElement).erasure();
if (originalType != this.declaringElement) {
return originalType.typeVariables()[this.rank];
}
}
return this;
}
COM: <s> returns the original type variable for a given variable </s>
|
funcom_train/5600694 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MathTransform2D getHorizontalToGeographicCRS() throws FactoryException {
// No need to synhronize - this is not a big deal if the transform is searched twice.
if (toGeographicCRS == null) {
toGeographicCRS = (MathTransform2D) CRS.findMathTransform(horizontalCRS, DefaultGeographicCRS.WGS84);
}
return toGeographicCRS;
}
COM: <s> returns the transform to the geographic crs </s>
|
funcom_train/44586721 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IJavaProject getJavaProject(IResource resource) {
switch(resource.getType()){
case IResource.FOLDER:
return new JavaProject(((IFolder)resource).getProject(), this);
case IResource.FILE:
return new JavaProject(((IFile)resource).getProject(), this);
case IResource.PROJECT:
return new JavaProject((IProject)resource, this);
default:
throw new IllegalArgumentException(Messages.element_invalidResourceForProject);
}
}
COM: <s> returns the active java project associated with the specified </s>
|
funcom_train/3121147 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void waitForNextAvailableThread() {
println("waiting for next available thread...");
while (listAvailableThreads.isEmpty() == true) {
try {
Thread.yield();
Thread.sleep(500);
}
catch (Exception e) {
// ignore
}
}
println("done waiting for next available thread...");
} // of method
COM: <s> spin wait until another thread is available </s>
|
funcom_train/8630447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getColumnTypeName(int column) throws SQLException {
try {
debugCodeCall("getColumnTypeName", column);
checkColumnIndex(column);
int type = result.getColumnType(--column);
return DataType.getDataType(type).name;
} catch (Exception e) {
throw logAndConvert(e);
}
}
COM: <s> returns the data type name of a column </s>
|
funcom_train/10532713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAssemblyViaReferences() throws Exception {
try {
Class c = Class.forName("org.apache.beehive.controls.test.assembly" +
".generated.AssemblyTest2Generated");
assertNotNull(c.newInstance());
}
catch (ClassNotFoundException cnfe) {
fail(cnfe.toString());
}
}
COM: <s> test that a control type specified via </s>
|
funcom_train/28724444 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ImageData blur(ImageData src) {
float weight = 1.0f / 9.0f;
float[][] k = new float[3][3];
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 3; j++) {
k[i][j] = weight;
}
}
long startTime = System.currentTimeMillis();
ImageData bi = convolve(src, k);
long endTime = System.currentTimeMillis();
showTime(endTime - startTime);
return bi;
}
COM: <s> blur the source data based on convolution </s>
|
funcom_train/29365960 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Integer addTag(Tag tagObject) {
Integer newTagId = null;
// Try to get the tag by exact name
Tag newTag = this.getTagByExactName(tagObject.getTagName());
if(newTag == null) {
newTagId = this.tagDao.saveTag(tagObject);
} else {
newTagId = newTag.getId();
}
return newTagId;
}
COM: <s> adds a new tag to the datastore if </s>
|
funcom_train/44724009 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PageableList executeFinder(String entityName, String finderName, Object[] params, Map sessionParameters, int offset, int maxResults, boolean returnFullCount) {
return (PageableList) new CatnapFinder(finderName, params, entityName, getSessionData(sessionParameters), null, offset, maxResults, returnFullCount, getProfileObject()).executeQuery();
}
COM: <s> execute finder method which accepts all possible parameters and returns a pageable list </s>
|
funcom_train/8046217 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PrologWAX xslt(String filePath) {
if (xsltSpecified) {
throw new IllegalStateException("can't specify more than one XSLT");
}
if (state != State.IN_PROLOG) badState("xslt");
if (verifyUsage) XMLUtil.verifyURI(filePath);
xsltSpecified = true;
return processingInstruction(
"xml-stylesheet", "type=\"text/xsl\" href=\"" + filePath + "\"");
}
COM: <s> writes an xml stylesheet processing instruction </s>
|
funcom_train/570696 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getValueAt( int row, int column ) {
try {
Vector vRow = ( Vector ) objects.elementAt( row );
return vRow.elementAt( column );
} catch ( Throwable t ) { // Ignore, empty table_ ?
//System.out.println( "JTableModel_ getValueAt() error: " + t );
}
return "";
}
COM: <s> get value at method comment </s>
|
funcom_train/50000167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean matches(EVirtualIConEvent eventObject) {
if(classEvent != null) {
return classEvent.isAssignableFrom(EVirtualIConEvent.class);
} else {
if (eventObject instanceof EVirtualIConEvent) {
String event = ((EVirtualIConEvent) eventObject).getNameEvent();
return (event == null);
}
}
return false;
}
COM: <s> cf method matches from virtual event </s>
|
funcom_train/39988653 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setWindowTransparent(Window w, boolean transparent) {
boolean isTransparent = w.getBackground() != null && w.getBackground().getAlpha() == 0;
if (transparent != isTransparent) {
setBackgroundTransparent(w, transparent, "setWindowTransparent");
}
}
COM: <s> note that the property </s>
|
funcom_train/44622644 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JCBlock convertMethodBody(JCMethodDecl decl) {
JCMethodDecl prev = methodDecl;
try {
this.methodDecl = decl;
return convert();
} catch (RuntimeException e) {
Log.instance(context).error("jml.internal.notsobad",e.getMessage());
return null;
} finally {
methodDecl = prev;
}
}
COM: <s> returns a new jcblock representing the rewritten body of the given method declaration </s>
|
funcom_train/8089012 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setKeywords(String value) {
String[] keywords;
int i;
m_Keywords.clear();
keywords = value.replaceAll(" ", "").split(",");
for (i = 0; i < keywords.length; i++)
m_Keywords.add(keywords[i].toUpperCase());
}
COM: <s> sets the keywords comma separated list to use </s>
|
funcom_train/48595929 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void newFilter() {
RowFilter<TicketsListModel, Object> rf;
//If current expression doesn't parse, don't update.
try {
rf = RowFilter.regexFilter(filterStringTextField.getText(), filterColumnsComboBox.getSelectedIndex());
} catch (java.util.regex.PatternSyntaxException e) {
return;
}
sorter.setRowFilter(rf);
}
COM: <s> update the row filter regular expression from the expression in </s>
|
funcom_train/49626412 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Element marshalJAXBObject(final Object o) {
SAXHandler jdomSaxHandler = new SAXHandler();
try {
Lifecycle.getJAXBContext().createMarshaller().marshal(o,
jdomSaxHandler);
} catch (JAXBException e) {
throw new PulseException("Error while unmarshalling "
+ o.getClass().getCanonicalName() + ": "
+ e.getLocalizedMessage(), e);
}
return jdomSaxHandler.getDocument().detachRootElement();
}
COM: <s> marshals a jaxb object to jdom </s>
|
funcom_train/38757523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void store() throws TransformerException {
Document doc = builder.newDocument();
doc.appendChild(doc.createElement("fileMonkey"));
for (FTPSite site : sites) {
appendFTPSite(doc, site);
}
appendFavorites(doc);
Transformer t = tf.newTransformer();
t.setOutputProperty(OutputKeys.INDENT, "yes");
java.io.File file = new java.io.File(filename);
StreamResult sr = new StreamResult(file);
t.transform(new DOMSource(doc), sr);
}
COM: <s> writes config to filename </s>
|
funcom_train/7601567 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Panel getShowPanel() {
if (showPanel == null) {
showPanel = new Panel();
showPanel.setLayout(new BoxLayout(getShowPanel(), BoxLayout.Y_AXIS));
showPanel.setMinimumSize(new Dimension(200, 200));
showPanel.setPreferredSize(new Dimension(200, 200));
showPanel.setMaximumSize(new Dimension(65534, 32767));
showPanel.add(getImgPanel(), null);
showPanel.add(getCtrlPanel(), null);
}
return showPanel;
}
COM: <s> this method initializes show panel </s>
|
funcom_train/34956608 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertElementAt(E obj, int index) {
modCount++;
if (index > elementCount) {
throw new ArrayIndexOutOfBoundsException(index
+ " > " + elementCount);
}
ensureCapacityHelper(elementCount + 1);
System.arraycopy(elementData, index, elementData, index + 1, elementCount - index);
elementData[index] = obj;
elementCount++;
}
COM: <s> inserts the specified object as a component in this vector at the </s>
|
funcom_train/965211 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void installSpecialBorder() {
String suffix;
BorderStyle borderStyle = BorderStyle.from(menuBar,
WindowsLookAndFeel.BORDER_STYLE_KEY);
if (borderStyle == BorderStyle.EMPTY)
suffix = "emptyBorder";
else if (borderStyle == BorderStyle.ETCHED)
suffix = "etchedBorder";
else if (borderStyle == BorderStyle.SEPARATOR)
suffix = "separatorBorder";
else if (HeaderStyle.from(menuBar) == HeaderStyle.BOTH)
suffix = "headerBorder";
else
return;
LookAndFeel.installBorder(menuBar, "MenuBar." + suffix);
}
COM: <s> installs a special border if either a look dependent </s>
|
funcom_train/50338801 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void openButton() {
// figure out which we're dealing with
if (locoBox.getSelectedRosterEntries().length != 0) {
// known loco
openKnownLoco();
} else if (isDecoderSelected()) {
// new loco
openNewLoco();
} else {
// should not happen, as the button should be disabled!
log.error("openButton with neither combobox nonzero");
}
}
COM: <s> handle pushing the open programmer button by finding names then calling </s>
|
funcom_train/50501527 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addButton_actionPerformed(ActionEvent e) {
String temp = this.getValidatedInputTag(this.nameField.getText().trim());
if(temp.length()!=0){
tableModel.getTags().add(temp);
this.removeDuplicates();
this.tableModel.fireTableStructureChanged();
checkButtons();
}
}
COM: <s> add button action </s>
|
funcom_train/3861964 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPathToDocRoot(String filename) {
// Right now, the server doc root starts two dir
// levels below the Sperowider doc root
String mPath = getPathToArchiveRoot(filename);
int mSlashPos = mPath.indexOf("/", mPath.indexOf("/") + 1);
return mPath.substring(mSlashPos + 1);
}
COM: <s> returns a path to the document root for the passed in filename </s>
|
funcom_train/5854354 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addError(final BadProgramLineException bple) {
// add to list
errorList
.add("Error [" + bple.getLineNumber() + "] " + bple.getError());
// record in vector
errors.addElement(bple);
logger.debug("Adding error " + bple.getLineNumber() + " "
+ bple.getError() + " " + bple.getStart() + " " + bple.getEnd());
}
COM: <s> add an error </s>
|
funcom_train/8374245 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compare(String o1, String o2) {
int lenComp = Integer.valueOf(o1.length()).compareTo(Integer.valueOf(o2.length()));
if (lenComp != 0) {
return lenComp;
}
if (o1.equals(o2)) {
return 0;
}
return o1.compareTo(o2) > 0 ? 1 : -1;
}
COM: <s> compares the length first </s>
|
funcom_train/41164281 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(CoWordsCompleteE3 entity) {
EntityManagerHelper.log("deleting CoWordsCompleteE3 instance", Level.INFO, null);
try {
entity = getEntityManager().getReference(CoWordsCompleteE3.class, entity.getWordsCompleteE3Id());
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 co words complete e3 entity </s>
|
funcom_train/41331443 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isParentLeftToRight() {
if (rootParent instanceof JFrame) {
return SeaGlassLookAndFeel.isLeftToRight((JFrame) rootParent);
} else if (rootParent instanceof JDialog) {
return SeaGlassLookAndFeel.isLeftToRight((JDialog) rootParent);
} else {
return false;
}
}
COM: <s> is the parent window laid out left to right </s>
|
funcom_train/49150099 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close()
{
frame.setVisible(false);
stop(); // Does an unsubscribe of all subscribed services
if (bc != null)
{
try
{
bc.getBundle().stop();
}
catch (BundleException BE)
{
BE.printStackTrace();
}
}
//System.exit(-1);
}
COM: <s> close down controller </s>
|
funcom_train/41612453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e) {
Object source = e.getSource();
if (source == goButton) {
try {
actionPerformedUnsafe(e);
} catch (Exception ex) {
String text = ex.toString();
if (ex.getMessage() != null) {
text = ex.getMessage();
}
resultArea.append(text + "\n");
return;
}
}
if (source == clearButton) {
resultArea.setText("");
}
}
COM: <s> parse the input as a query prove it repeatedly </s>
|
funcom_train/38854053 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean subscribe(JFController controller) {
boolean result = true;
if (controller == null) {
result = false;
LOGGER.log(Level.SEVERE, "[" + this.toString() + "] Controller cannot be null");
} else {
addObserver(controller);
LOGGER.log(Level.INFO, "[" + this.toString() + "] Subscribed controller " + controller.toString());
}
return result;
}
COM: <s> subscribes specified controller to this model </s>
|
funcom_train/3373396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TableCellEditor getCellEditor(int row, int column) {
TableColumn tableColumn = getColumnModel().getColumn(column);
TableCellEditor editor = tableColumn.getCellEditor();
if (editor == null) {
editor = getDefaultEditor(getColumnClass(column));
}
return editor;
}
COM: <s> returns an appropriate editor for the cell specified by </s>
|
funcom_train/18350510 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean fileNameExists(File parent, File file) {
boolean exists = false;
String fileName = file.getName();
File[] files = parent.listFiles();
for (int i = 0; i < files.length; i++) {
if (files[i].getName().equals(fileName)) {
exists = true;
break;
}
}
return exists;
}
COM: <s> tests whether file name exists in parent directory </s>
|
funcom_train/11399972 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void load() throws IOException {
final StringBuffer fileData = new StringBuffer(1000);
final BufferedReader reader = this.getReader();
char[] buf = new char[1000];
int numRead = 0;
while ((numRead = reader.read(buf)) != -1) {
final String readData = String.valueOf(buf, 0, numRead);
fileData.append(readData);
buf = new char[1000];
}
this.addContent(fileData.toString());
this.setComplete(true);
reader.close();
}
COM: <s> loads the remainder of the content from the input stream </s>
|
funcom_train/37730438 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveJPGFileSync(String filename) {
if (viewportManager == null) {
System.out.println("saveJPGFileSync: viewportManager==null");
return;
}
Viewport viewport = viewportManager.getViewportByLabel("Default View");
// Put some warning to the user in case the requested viewport does not
// exists
if (viewport != null) {
saveJPGFileSync(viewport, filename);
} else {
System.out.println("saveJPGFile: Viewport Default View not found");
}
}
COM: <s> saves a snapshot from default view in a jpeg file this method enforces </s>
|
funcom_train/18661488 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
while ( !endThread ) {
ThumbnailQueueRequest req = ThumbnailCreationQueue.poll();
if ( req == null ) {
try {
Thread.sleep( Settings.ThumbnailCreationThreadPollingTime );
} catch ( InterruptedException x ) {
// so we got interrupted?
}
} else {
createThumbnail( req );
}
}
}
COM: <s> the run method for the thread that keeps checking whether there are any </s>
|
funcom_train/9567259 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isRevocationValid() {
if (basicResp == null)
return false;
if (signCerts.size() < 2)
return false;
try {
X509Certificate[] cs = (X509Certificate[]) getSignCertificateChain();
SingleResp sr = basicResp.getResponses()[0];
CertificateID cid = sr.getCertID();
X509Certificate sigcer = getSigningCertificate();
X509Certificate isscer = cs[1];
CertificateID tis = new CertificateID(CertificateID.HASH_SHA1, isscer, sigcer.getSerialNumber());
return tis.equals(cid);
} catch (Exception ex) {
}
return false;
}
COM: <s> checks if ocsp revocation refers to the document signing certificate </s>
|
funcom_train/50774461 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void progressPerformed(ProgressEvent e){
if ((e.getType() & ProgressEvent.OPEN ) == ProgressEvent.OPEN)
this.setVisible(true);
messageLabel.setText(e.getMessage() );
setProgressBar(e.getProgress() );
if ((e.getType() & ProgressEvent.CLOSE) == ProgressEvent.CLOSE)
this.setVisible(false);
}
COM: <s> invoked when an event occurs </s>
|
funcom_train/4786070 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createWeeksHolder() {
weeksHolder = new Composite(this, SWT.NONE);
GridLayout gridLayout = new GridLayout();
gridLayout.horizontalSpacing = 0;
gridLayout.marginWidth = 0;
gridLayout.verticalSpacing = 1;
gridLayout.marginHeight = 0;
weeksHolder.setLayout(gridLayout);
GridData gd = new GridData();
gd.horizontalAlignment = GridData.FILL;
gd.grabExcessHorizontalSpace = true;
gd.grabExcessVerticalSpace = true;
gd.verticalAlignment = GridData.FILL;
weeksHolder.setLayoutData(gd);
}
COM: <s> this method initializes composite </s>
|
funcom_train/32969602 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton25() {
if (jButton25 == null) {
jButton25 = new JButton();
jButton25.setRolloverIcon(new ImageIcon(getClass().getResource("/orders/sel/send2.gif")));
jButton25.setToolTipText("Send");
jButton25.setPressedIcon(new ImageIcon(getClass().getResource("/orders/push/send3.gif")));
jButton25.setIcon(new ImageIcon(getClass().getResource("/orders/norm/send1.gif")));
jButton25.setDoubleBuffered(true);
jButton25.setBounds(new java.awt.Rectangle(672,36,34,34));
jButton25.setBorderPainted(false);
}
return jButton25;
}
COM: <s> this method initializes j button25 </s>
|
funcom_train/46002523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doSearchChange(){
String search = fieldSearch.getText();
if(search==null || search.equals("")){
buttonSearch.setEnabled(false);
buttonReplace.setEnabled(false);
buttonReplaceAll.setEnabled(false);
}else{
buttonSearch.setEnabled(true);
buttonReplace.setEnabled(true);
buttonReplaceAll.setEnabled(true);
}
}
COM: <s> field search button search button replace button replace all </s>
|
funcom_train/48390154 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HandlerRegistration addEventResizedHandler(com.smartgwt.client.widgets.calendar.events.EventResizedHandler handler) {
if(getHandlerCount(com.smartgwt.client.widgets.calendar.events.CalendarEventResized.getType()) == 0) setupEventResizedEvent();
return doAddHandler(handler, com.smartgwt.client.widgets.calendar.events.CalendarEventResized.getType());
}
COM: <s> add a event resized handler </s>
|
funcom_train/167833 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void prepare() {
targets_.clear();
String targetName = null;
Component component;
Node target;
Iterator item = getNodesIterator();
while (item.hasNext()) {
component = (Component) item.next();
if (component.isPrefixed("target")) {
try {
targetName = component.getValueString();
target = getNode(targetName);
if (target instanceof Parameter)
targets_.add(target);
} catch (NullPointerException e) {
log.error(getName() + "cannot find target '" + targetName
+ "'.", e);
}
}
}
super.prepare();
}
COM: <s> set targets to the list br list </s>
|
funcom_train/19399151 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ByteBuffer putLeaf(ILeafData leaf) {
if( _buf == null ) {
// the buffer was released so we reallocate it.
_buf = alloc(initialBufferCapacity);
}
// while (true) {
try {
return putLeaf(_buf,leaf);
} catch (IOException ex) {
throw new RuntimeException(ex); // exception is not expected.
} catch (BufferOverflowException ex) {
throw ex; // exception is not expected.
// extendBuffer();
}
// }
}
COM: <s> serialize a leaf node onto a buffer </s>
|
funcom_train/15624839 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parseArtifacts(@NotNull final String artifacts) throws IOException {
final Reader reader = new StringReader(artifacts);
final BufferedReader bufferedReader = new BufferedReader(reader);
try {
artifactParser.loadArtifact(bufferedReader, errorViewCollector, "", "panel", "folder");
} finally {
bufferedReader.close();
}
}
COM: <s> parses artifacts definitions </s>
|
funcom_train/21653097 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setConfig(Player p, int id, int set) {
if (p == null || p.stream == null || p.disconnected[0]) {
return;
}
p.getByteVector().setId(100);
p.getByteVector().addShortA(id);
p.getByteVector().addByteA(set);
}
COM: <s> setting client configs </s>
|
funcom_train/23411518 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addPropertyPredicatePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_IndividualPropertyAtom_propertyPredicate_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_IndividualPropertyAtom_propertyPredicate_feature", "_UI_IndividualPropertyAtom_type"),
SwrlPackage.Literals.INDIVIDUAL_PROPERTY_ATOM__PROPERTY_PREDICATE,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the property predicate feature </s>
|
funcom_train/11641225 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object getShort(int columnIndex) throws SQLException {
Object obj = this.currentRow[columnIndex - 1];
this.setWasNull(obj);
try {
return (obj == null)
? Short.valueOf((short) 0)
: Short.valueOf(obj.toString());
} catch (NumberFormatException e) {
throw new SQLException(e.getMessage());
}
}
COM: <s> gets the short value at the given column index </s>
|
funcom_train/31357626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void propertyChange(PropertyEvent event) {
String propertyName = event.getProperty()[0];
if (propertyName.equals(EXTENSION) || propertyName.equals(PATH) ||
propertyName.equals(PARAMS)) {
// need to shutdown and re-initialize engine
shutdown();
initialize(service, parameters);
} else if(propertyName.equals(RESPONSE_TO)) {
// update response timeout
try {
responseTO = Integer.parseInt((String)event.getNewValue());
} catch (Exception e) {}
}
}
COM: <s> handles a driver property change event </s>
|
funcom_train/34889651 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean testGroups(short objectType, boolean[] possibleGroups) {
int index = this.getIndex(objectType);
for (int groupNo = 0; groupNo < possibleGroups.length && groupNo < GROUPS_NUMBER; ++groupNo) {
if (possibleGroups[groupNo] == true && this.objectGroups[groupNo][index] == true) {
return true;
}
}
return false;
}
COM: <s> tests whether the given object type belongs to any of the given </s>
|
funcom_train/29833186 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getNumberOfDirectedEdges() {
int numberOfDirectedEdges = 0;
for (Iterator<Edge> edgeIt = getEdgesIterator(); edgeIt.hasNext();) {
Edge testedEdge = edgeIt.next();
if (testedEdge.isDirected()) {
numberOfDirectedEdges++;
}
}
logger.fine("this graph contains " + numberOfDirectedEdges
+ " directed edge(s)");
return numberOfDirectedEdges;
}
COM: <s> returns the number of directed edges of the graph </s>
|
funcom_train/43268862 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLabel(String label) {
// Error handiling to match database schema
if ((label != null) && (label.length() > 50)) {
label = label.substring(0, 50);
System.err.println("WARNING: Truncating label to 50 characters");
}
this.label = label;
}
COM: <s> sets the code section info code label attribute </s>
|
funcom_train/40683634 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void buildControlPanelRow(FlexTable table, String text, Widget w) {
table.insertRow(currentRow);
table.insertCell(currentRow, 0);
table.setWidget(currentRow, 0, new HTML(text));
table.insertCell(currentRow, 1);
table.setWidget(currentRow, 1, w);
currentRow++;
}
COM: <s> utility routine to construct one row of the user interface control panel </s>
|
funcom_train/1436124 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Image filter(Image image) {
Image processedImage = null;
if (image instanceof IntensityImage) {
IntensityImage intensImage = (IntensityImage) image;
short[][] matrix = intensImage.getData();
short[][] equalizedMatrix = filter(matrix);
processedImage = new IntensityImage(equalizedMatrix);
} else {
System.out.println("Histogram equalization is only "
+ "implemented for instances of " + "IntensityImage.");
processedImage = null;
}
return processedImage;
}
COM: <s> performs histogram equalization on an intensity image </s>
|
funcom_train/25173350 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public void SwitchTo(int lexState) {
if (lexState >= 2 || lexState < 0) {
throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
} else {
curLexState = lexState;
}
}
COM: <s> switch to specified lex state </s>
|
funcom_train/23721313 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PropertyTree firstTree(String key) {
checkKey(key);
List<Object> list = map.get(key);
if (list == null) {
return null;
} else {
Object res = list.get(0);
if (res instanceof PropertyTree) {
return (PropertyTree) res;
} else {
throw new PropertyTreeException("unexpected String");
}
}
}
COM: <s> get the first property tree value of a named property </s>
|
funcom_train/5399518 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getMessage () {
StringBuffer result = new StringBuffer();
result.append("Element '" + elementName + "' doesn't have '" + attrName + "' attribute.");
if (allowedAttributes != null) {
result.append("\nAttributes allowed for this element follows: ");
result.append(allowedAttributes.toString());
}
return new String(result);
}
COM: <s> returns a detail message for this exception </s>
|
funcom_train/17178424 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getModificationDescriptions(HashMap<Integer, PTM> modifications) {
String descriptionList = "";
String name;
boolean coma = false;
for (PTM ptm : modifications.values()) {
name = ptm.getName();
if (coma) {
descriptionList += ",";
} else {
coma = true;
}
descriptionList += name;
}
return descriptionList;
}
COM: <s> generates the descriptions of the modifications as a string </s>
|
funcom_train/24939806 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void outputArray(Object obj) throws IOException {
openTable(obj, 2);
boolean primitive = obj.getClass().getComponentType().isPrimitive();
for (int i = 0; i < Array.getLength(obj); i++) {
out.println("<TR>");
out.println("<TD>[" + i + "]</TD>");
Object value = Array.get(obj, i);
outputValue(value, primitive);
out.println("</TR>");
}
closeTable();
}
COM: <s> outputs a given array </s>
|
funcom_train/44778076 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void moveDown(int index) {
GenericListModel model = null;
try {
model = (GenericListModel) getModel();
} catch (Exception e) {
return;
}
if ((index == model.size()-1) || (index == -1)) {
return;
}
Object item = model.remove(index);
index++;
model.add(index, item);
setSelectedIndex(index);
}
COM: <s> moves down the given item one position in this list </s>
|
funcom_train/47281975 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ColumnMergeRules duplicate(MatchMakerObject parent) {
logger.debug("Duplicating...");
ColumnMergeRules columnRule = new ColumnMergeRules();
columnRule.setColumn(getColumn());
columnRule.setParent(parent);
columnRule.setName(getName());
columnRule.setActionType(actionType);
columnRule.setInPrimaryKey(inPrimaryKey);
columnRule.setImportedKeyColumn(getImportedKeyColumn());
columnRule.setUpdateStatement(updateStatement);
columnRule.setVisible(isVisible());
return columnRule;
}
COM: <s> creates a copy of this instance </s>
|
funcom_train/44919910 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setup() {
setupLayout();
connectWithServer();
setAppletTitle("Applet Administration Console"); //$NON-NLS-1$
getOptionsPanel().setComponentMap(createOptionsComponentMap(), getBeans());
add(getVisualizerTabs(), BorderLayout.CENTER);
add(getControlPanel(), BorderLayout.SOUTH);
setVisualizationDimensions(getVisualizationFactory());
try {
addVisualizers();
} catch (final VisualizationException e) {
LOG.warn("setup(): exception thrown", e); //$NON-NLS-1$
}
}
COM: <s> method which is called by invoked by </s>
|
funcom_train/3729662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initialize() {
Enumeration e;
try {
e =
PersistentManager.getInstance().findAllProxy(
"Repository",
"org.jiuston.bo.RepositoryProxy");
RepositoryProxy rp;
while (e.hasMoreElements()) {
rp = (RepositoryProxy) e.nextElement();
this.getRepositories().addElement(rp);
rp.setState(OldCleanState.getInstance());
Cache.getInstance().addObject(rp);
}
} catch (PersistentManagerException e1) {
e1.printStackTrace();
}
}
COM: <s> initialize repository collection from database </s>
|
funcom_train/18672155 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void append(final String str) {
String reason;
if (str == null) {
return;
}
if ((reason = Verifier.checkCharacterData(str)) != null) {
throw new IllegalDataException(str, "character content", reason);
}
if (str == EMPTY_STRING) {
this.value = str;
} else {
this.value += str;
}
}
COM: <s> this will append character content to whatever content already exists </s>
|
funcom_train/50273318 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int assignStreamId(Stream s) throws TorException {
// assign stream ID and memorize stream
int streamId = getFreeStreamID();
if (!assignStreamId(s, streamId)) {
throw new TorException("streamId="+streamId+" could not be set");
}
return streamId;
}
COM: <s> find a free stream id set it in the stream s </s>
|
funcom_train/34595250 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addExclusiveItem(String name, String pokemon) {
Object o = m_exclusives.get(pokemon);
if (o == null) {
HashSet set = new HashSet();
set.add(name);
m_exclusives.put(pokemon, set);
} else {
((HashSet)o).add(name);
}
}
COM: <s> add an exclusive item to a pokemon </s>
|
funcom_train/22929426 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConstructor() {
final String[] PARAMETERS = array("123");
Command command = new Command("abc", PARAMETERS);
assertEquals("name", "abc", command.getName());
assertEquals("parameters", PARAMETERS, command.getParameters());
}
COM: <s> test the command string string constructor </s>
|
funcom_train/27718897 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setComponent(JComponent component) {
if (this.component != null){
//this.remove(this.component);
getComponentContainer().remove(this.component);
}
this.component = component;
//add(this.component, CONSTRAINTS);
getComponentContainer().add(component, BorderLayout.CENTER);
}
COM: <s> sets the wrapped component </s>
|
funcom_train/31211880 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private PropertyInfo processDeclaration(Object constraint) {
Declaration declaration = (Declaration) constraint;
ClassFieldReader field = (ClassFieldReader) declaration.getExtractor();
PropertyInfo propertyInfo = new PropertyInfo();
propertyInfo.setName(field.getFieldName());
propertyInfo.setVar(declaration.getIdentifier());
propertyInfo.setClazz(field.getClassName());
whenPartAnalyzer.getBindingsManager().put(propertyInfo);
return propertyInfo;
}
COM: <s> processes declaration from pattern </s>
|
funcom_train/44165700 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Element updateMapGeneratorOptions(Element element) {
Element mgoElement = (Element)element
.getElementsByTagName(MapGeneratorOptions.getXMLElementTagName())
.item(0);
getFreeColClient().getGame().getMapGeneratorOptions()
.readFromXMLElement(mgoElement);
gui.updateMapGeneratorOptions();
return null;
}
COM: <s> handles an update map generator options message </s>
|
funcom_train/42652285 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int sizeOfCollection(Property property, Object obj) {
if(! property.isCollection()) throw new RuntimeException("Not a collection: " + property.getName());
Object collection = getValue(property,obj);
if(collection == null) throw new RuntimeException("Collection not initialized, cannot detect size: " + property.getName());
return getCollectionsHandler(property).size(collection);
}
COM: <s> returns the size of the collection that corresponds to the given </s>
|
funcom_train/31660590 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List findAllClasses(String uri) throws IOException, ClassNotFoundException {
List classes = new ArrayList();
List strings = findAllStrings(uri);
for (int i = 0; i < strings.size(); i++) {
String className = (String) strings.get(i);
Class clazz = classLoader.loadClass(className);
classes.add(clazz);
}
return classes;
}
COM: <s> executes find all strings assuming the strings are </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.