__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/50253098 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ProcessDefinition getProcessDefinition(long processDefinitionId) {
try {
return (ProcessDefinition) session.get(ProcessDefinition.class, new Long(processDefinitionId));
} catch (Exception e) {
log.error(e);
jbpmSession.handleException();
throw new JbpmException("couldn't get process definition '" + processDefinitionId + "'", e);
}
}
COM: <s> gets a process definition from the database by the identifier </s>
|
funcom_train/41722342 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int calculateDistance(TileList window1,TileList window2) {
if (window1 == null || window2 == null)
return Integer.MAX_VALUE;
int size1 = window1.size();
int size2 = window2.size();
if (size1 != size2)
return Math.max(size1, size2);
int distance = 0;
for (int i = 0; i < size1; i++) {
if (!window1.get(i).equals(window2.get(i)))
distance++;
}
return distance;
}
COM: <s> returns the hamming distance between the two windows </s>
|
funcom_train/18059135 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public UID ICons() throws RemoteException {
synchronized(SO) {
SO.rmcCount++;
try {
IOSlob is = new IOSlob();
UID uid = new UID();
SO.objectMap.put(uid, is);
return uid;
} catch(Exception e) {
throw new RemoteException(e.getMessage());
}
}
}
COM: <s> constructor for the direct access i o class </s>
|
funcom_train/4702681 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("TestServicePort".equals(portName)) {
setTestServicePortEndpointAddress(address);
}
else
{ // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
COM: <s> set the endpoint address for the specified port name </s>
|
funcom_train/37446471 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void CreateWriter () throws IntactException {
try {
fileWriter = new FileWriter(inputFile);
}
catch (IOException io) {
logger.error ("Error while creating a file ("+ inputFile +"), cause: " + io.getCause(), io);
throw new IntactException ("Error while creating a file: " + inputFile, io);
}
}
COM: <s> if the put in file method needs to be managed in a loop </s>
|
funcom_train/7351163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMapSchema() throws Exception {
StringWriter str = new StringWriter();
_transformer.writeXMLSchema(
TestMapObject.class,
Arrays.asList(new Class[] { HashMap.class }),
new StreamResult(str));
String schema = str.toString();
// validate
String serial = _transformer.serializeToString(_testMap);
validate(schema, serial);
}
COM: <s> test if the serialized test object validates against its schema </s>
|
funcom_train/27946052 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setData(int[] series) {
if (series==null)
throw new IllegalArgumentException("null");
data=new int[series.length];
System.arraycopy(series, 0, data, 0, series.length);
recompute();
fireStateChanged();
}
COM: <s> sets new time series values to a copy of a given argument </s>
|
funcom_train/38975516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int Connecting(int LineNum) {
int i=LineNum, CalledNum = CallRecord[i].getCalledNum();
DigitScanner[i].reset(); //resets DigitScanner
TSS.controller.setPhoneTone(i, "RingBackTone");//send RingBackTone to i
TSS.controller.setPhoneTone(CalledNum, "RingingTone");//send SignalRingingTone to CalledNum
return 5; //to Talking
}
COM: <s> call process 4 </s>
|
funcom_train/3373608 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addExternalComment(String comment) {
Object comments = getProperty(AdditionalComments);
if (comments != null && !(comments instanceof Vector)) {
// No place to put comment.
return;
}
if (comments == null) {
comments = new Vector();
putProperty(AdditionalComments, comments);
}
((Vector)comments).addElement(comment);
}
COM: <s> adds the comment code comment code to the set of comments </s>
|
funcom_train/50208077 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected IFigure createFigure() {
if (getModel() == null)
return null;
//return Flow4FigureFactory.createFlowletLabelFigure(
// ((FlowletLabelModelPart) getModel()).getText());
FlowletLabelFigure flowletLabelFigure =
(FlowletLabelFigure) Flow4FigureFactory.createFlowletLabelFigure(((FlowletLabelModelPart) getModel()).getText());
adjustFlowletLabelFigure(flowletLabelFigure);
return flowletLabelFigure;
}
COM: <s> creates the flowlet figure with the models text </s>
|
funcom_train/46382384 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void activateLoader(ModelLoaderFactory loader) {
// make sure the loader exists
if (!loaders.contains(loader)) {
throw new IllegalStateException("Activating non-existant loader " +
loader);
}
loader.setEnabled(true);
if (loader.getFileExtension()!=null)
activeLoaders.put(loader.getFileExtension(), loader);
}
COM: <s> activate a particular loader and deactivate any loader that was </s>
|
funcom_train/17001935 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
int[] _destinations = ((Destinations)obj).getDestinationsInInts();
if (destinations.length != _destinations.length) return false;
for (int i=0; i < destinations.length; i++) {
if (destinations[i] != _destinations[i]) {
return false;
}
}
return true;
}
COM: <s> compares two objects for equality </s>
|
funcom_train/44222502 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initCardPanels() {
this.createCardPanel1();
this.createCardPanel2();
this.getContentPane().setLayout(new CardLayout());
this.getContentPane().add(this.cardPanel1, CARD_PANAL1);
this.getContentPane().add(this.cardPanel2, CARD_PANAL2);
}
COM: <s> initialize card panels and add them to the wizard dialog </s>
|
funcom_train/44013659 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeConceptGraph(String name, ConceptGraph cg) {
ObjectOutputStream os = null;
File cgFile = new File(getConceptGraphFileName(name));
if (!cgFile.getParentFile().exists())
cgFile.getParentFile().mkdirs();
try {
os = new ObjectOutputStream(new BufferedOutputStream(
new GZIPOutputStream(new FileOutputStream(cgFile))));
os.writeObject(cg);
} catch (IOException ioe) {
throw new RuntimeException(ioe);
} finally {
if (os != null)
try {
os.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
COM: <s> write the concept graph create parent directories as required </s>
|
funcom_train/22399514 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reset() {
byteCount = 0;
xBufOff = 0;
for (int i = 0; i < xBuf.length; i++) {
xBuf[i] = 0;
}
H1 = 0x67452301;
H2 = 0xefcdab89;
H3 = 0x98badcfe;
H4 = 0x10325476;
H5 = 0xc3d2e1f0;
xOff = 0;
for (int i = 0; i != X.length; i++) {
X[i] = 0;
}
}
COM: <s> reset the chaining variables </s>
|
funcom_train/37519198 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public String readFile(String filename, byte[] cb) throws java.io.IOException {
int i = 0;
int j = 0;
java.io.FileInputStream f = new java.io.FileInputStream(filename);
while (j != -1) {
i = i + j;
j = f.read(cb,i,cb.length-i);
}
f.close();
return new String(cb,0,i);
}
COM: <s> reads the contents of the file with the given name returning a string </s>
|
funcom_train/24086118 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean hasValuesForRecords(Values values, int records[]) {
if (values != null) {
List<Value> list = values.getList();
for (int record : records) {
if (record < list.size() && list.get(record) != null) {
return true;
}
}
}
return false;
}
COM: <s> checks whether the given values object contains values for the specified records </s>
|
funcom_train/32138568 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doSaveAs() {
File file = queryFile();
if(file == null) {
return;
}
IEditorInput inputFile = createEditorInput(file);
IDocument doc = getSourceViewer().getDocument();
String s = doc.get();
try {
FileOutputStream fos = new FileOutputStream(file);
PrintStream ps = new PrintStream(fos);
ps.print(s);
} catch(FileNotFoundException fnfe) {}
setInput(inputFile);
setPartName(inputFile.getName());
}
COM: <s> performs a save as on the idocument </s>
|
funcom_train/19844712 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Particle getNewParticle(ParticleEmitter emitter, float life) {
ParticlePool pool = (ParticlePool) particlesByEmitter.get(emitter);
ArrayList available = pool.available;
if (available.size() > 0) {
Particle p = (Particle) available.remove(available.size() - 1);
p.init(emitter, life);
p.setImage(sprite);
return p;
}
Log.warn("Ran out of particles (increase the limit)!");
return dummy;
}
COM: <s> get a new particle from the system </s>
|
funcom_train/10861939 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean handleSwapAction(SolrQueryRequest req, SolrQueryResponse rsp) {
final SolrParams params = req.getParams();
final SolrParams required = params.required();
final String cname = params.get(CoreAdminParams.CORE);
boolean doPersist = params.getBool(CoreAdminParams.PERSISTENT, coreContainer.isPersistent());
String other = required.get(CoreAdminParams.OTHER);
coreContainer.swap(cname, other);
return doPersist;
}
COM: <s> handle swap action </s>
|
funcom_train/12670988 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLiftFood() {
System.out.println("liftFood");
int ammount = 0;
AntImpl instance = new AntImpl();
instance.liftFood(ammount);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of lift food method of class engine </s>
|
funcom_train/12178588 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRenderTooMuchRepetition() {
MarqueeAttributeValueRenderer renderer =
new MarqueeAttributeValueRenderer(false);
final StyleInteger integer =
StyleValueFactory.getDefaultInstance().getInteger(null, 17);
final String renderedValue = renderer.render(integer);
assertEquals("1", renderedValue);
}
COM: <s> verify that rendering a value for the </s>
|
funcom_train/27778821 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object removeLast(){
synchronized(keys){
if(!isEmpty()){
Object o = null;
try{
o = remove(keys.get(0));
keys.remove(0);
values.remove(0);
}catch(IndexOutOfBoundsException ioobe){
//This happens somethimes ???!!!
}
return o;
}else{
return null;
}
}
}
COM: <s> removes the last key value pair in this map </s>
|
funcom_train/28477272 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ArrayList getExtensionsList() {
if ((typeProperties == null) || typeProperties.isEmpty()) {
return null;
}
if (typeProperties.get("Extensions") instanceof ArrayList) {
extensionsList = (ArrayList) typeProperties.get("Extensions");
}
if ((extensionsList != null) &&!extensionsList.isEmpty()) {
return extensionsList;
}
return extensionsList;
}
COM: <s> gets types extensions list </s>
|
funcom_train/51615432 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Iterator groupBy(Sort[] sorts) {
Iterator sorted_data = getValues(sorts);
Accessor data_accessor = new ArrayAccessor(descriptor.getAttributeNamesArray());
JavaCubeDescriptor subcube_descriptor = new JavaCubeDescriptor(data_accessor);
return new GroupAggregatingIterator(sorted_data, subcube_descriptor, sorts);
}
COM: <s> group data by given attributes </s>
|
funcom_train/43269145 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
/*
* StringBuffer buf = new StringBuffer( "UserAccount" );
* buf.append( "( " );
* buf.append( userName );
* buf.append( ", " );
* buf.append( role );
* buf.append( " )" );
* return buf.toString();
*/
return userName;
}
COM: <s> a string representation of this code user account code </s>
|
funcom_train/36467188 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Connection getConnection() throws SQLException {
try {
Class.forName(driver);
Connection conn = DriverManager.getConnection(url + path);
return conn;
} catch (SQLException e) {
System.out.println("Internal DAO path incorrect.");
throw e;
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
COM: <s> generates a connection from the internal db based on the initialized path </s>
|
funcom_train/3493047 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addScaled(HashMapVector vector, double scalingFactor) {
Iterator mapEntries = vector.iterator();
while (mapEntries.hasNext()) {
Map.Entry entry = (Map.Entry)mapEntries.next();
// An entry in the HashMap maps a token to a Weight
String token = (String)entry.getKey();
// The weight for the token is in the value of the Weight
double weight = ((Weight)entry.getValue()).getValue();
increment(token, scalingFactor * weight);
}
}
COM: <s> destructively add a scaled version of the given vector to the current vector </s>
|
funcom_train/40381863 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final private boolean confirmLeaveState() {
if( onLeaveQuestion == null ) return true;
boolean confirmed = Window.confirm( onLeaveQuestion );
if( confirmed ) {
// User has confirmed, don't ask any more question.
setOnLeaveConfirmation( null );
} else {
History.newItem(currentHistoryToken, false);
}
return confirmed;
}
COM: <s> if a confirmation question is set see </s>
|
funcom_train/36061345 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DatabaseMetaData getDatabaseMetaData( String sessionIdentifier ) throws NoSessionException, GeneralizedException, InsufficientPermissionException{
checkRight(sessionIdentifier, "System.Information.View");
try{
return appRes.getDatabaseMetaData();
}catch (SQLException e){
appRes.logExceptionEvent(EventLogMessage.EventType.SQL_EXCEPTION, e );
throw new GeneralizedException();
}catch (NoDatabaseConnectionException e) {
appRes.logExceptionEvent(EventLogMessage.EventType.DATABASE_FAILURE, e);
throw new GeneralizedException();
}
}
COM: <s> retrieve the database meta data </s>
|
funcom_train/51604914 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInstallation(Date installation) {
if (installation == null) {
return;
}
if (this.installation != null) {
if (DateFormat.getDateInstance(DateFormat.SHORT).format(this.installation).equals(
DateFormat.getDateInstance(DateFormat.SHORT).format(installation))) {
return;
}
}
if (installation == this.installation) {
return;
}
if (uninstallation != null) {
if (installation.after(uninstallation)) {
return;
}
}
this.installation = installation;
setModified(true);
}
COM: <s> this method define hardware installation date </s>
|
funcom_train/48406360 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addLinkedRoleUsePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ProcessPerformer_linkedRoleUse_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ProcessPerformer_linkedRoleUse_feature", "_UI_ProcessPerformer_type"),
SpemxtcompletePackage.eINSTANCE.getProcessPerformer_LinkedRoleUse(),
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the linked role use feature </s>
|
funcom_train/21619853 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetUsername() {
System.out.println("getUsername");
UserBO instance = null;
String expResult = "";
String result = instance.getUsername();
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 username method of class edu </s>
|
funcom_train/29614437 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JsVect3D com3(int a, int b, int c, JsVect3D v2, JsVect3D v3) throws Exception{
double[] result = {0.,0.,0.};
double at[] = {a};
double bt[] = {b};
double ct[] = {c};
jspice.vlcom3(at,xyz,bt,v2.getVect(),ct,v3.getVect(),result);
return(new JsVect3D(result));
}
COM: <s> this subroutine computes the vector linear combination </s>
|
funcom_train/49027104 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getSalvaModificheInfo() {
if (modificheInfo == null) {
modificheInfo = new JButton();
modificheInfo.setVisible(true);
modificheInfo.setText("Salva le modifiche alle informazioni");
modificheInfo.setIcon(new ImageIcon(getClass().getResource("/icone/accept-icon.png")));
modificheInfo.setFont(new Font("Dialog", Font.BOLD, 12));
modificheInfo.addActionListener(this);
}
return modificheInfo;
}
COM: <s> this method initializes modifiche info </s>
|
funcom_train/35189515 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRowSet(RowSet rowSet) {
if (this.rowSet != null) {
this.rowSet.removeRowSetListener(this);
}
this.rowSet = rowSet;
columnToIndexMap.clear();
rowSet.addRowSetListener(this);
updateRowCount();
fireTableStructureChanged();
}
COM: <s> setter for the code row set code property </s>
|
funcom_train/45623076 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addTaskNamePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_UsingTaskType_taskName_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_UsingTaskType_taskName_feature", "_UI_UsingTaskType_type"),
MSBPackage.eINSTANCE.getUsingTaskType_TaskName(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the task name feature </s>
|
funcom_train/21612778 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fillSequenceShortDescription(StringBuilder sb, String sequenceName, Invocable sequence) {
sb
.append( sequenceName )
.append( ":" )
.append( sequence.getSignature().toString() )
.append(" - ")
.append( sequence.getShortDescription() )
.append("\n");
}
COM: <s> fills given string builder with info of given sequence with a short description </s>
|
funcom_train/22659410 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void panic(Pos pos, String msg) {
BugReport bug = new BugReport(msg);
err.println("PANIC: "+ pos.getLine() + "," + pos.getColumn()
+ ": " + bug.getReport());
throw new RuntimeException();
}
COM: <s> outputs a positioned panic message as a bug report </s>
|
funcom_train/26445185 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString(){
String output ="";
output += getName() + " ";
if(getAttributes().containsKey("Pool"))output += " pool: " + getAttributes().getString("Pool");
if(getAttributes().containsKey("Role"))output += " role: " + getAttributes().getString("Role");
output += " Type: " + getAttributes().getString("AgentClass");
output += "\n";
return output;
}
COM: <s> to string method role and pool </s>
|
funcom_train/13542032 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void read(InputStream is) throws IOException {
byte[] doc = Misc.inputStreamToByteArray(is);
boolean bZip = MIMETypes.ZIP.equals(MIMETypes.getMagicMIMEType(doc));
// if it's zip, assume package - otherwise assume flat
read(new ByteArrayInputStream(doc),bZip);
}
COM: <s> read the office code document code from the given </s>
|
funcom_train/28350323 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void makeContent() {
Box dialogView = new Box( BoxLayout.Y_AXIS );
getContentPane().add( dialogView );
Box mainView = new Box( BoxLayout.X_AXIS );
mainView.add( createListView() );
mainView.add( createButtonView() );
dialogView.add( mainView );
dialogView.add( createConfirmBar() );
}
COM: <s> create the dialogs subviews </s>
|
funcom_train/11721985 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Calendar getLastModified(Node node) throws RepositoryException {
if (node.hasProperty(Property.JCR_LAST_MODIFIED)) {
return node.getProperty(Property.JCR_LAST_MODIFIED).getDate();
} else if (node.hasNode(Node.JCR_CONTENT)) {
return getLastModified(node.getNode(Node.JCR_CONTENT));
} else {
return null;
}
}
COM: <s> returns the last modified date of the given file node </s>
|
funcom_train/51782581 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void drawSegment(DrawingContext drawingContext, Line2D segment) {
if (isDashed()) {
drawingContext.drawDashedLine(segment.getX1(), segment.getY1(),
segment.getX2(), segment.getY2());
} else {
drawingContext.drawLine(segment.getX1(), segment.getY1(),
segment.getX2(), segment.getY2());
}
}
COM: <s> draws a line segment using the current line style </s>
|
funcom_train/33606727 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testClosestOnLine() {
System.out.println("closestOnLine");
R2 point1 = null;
R2 point2 = null;
R2 instance = new R2();
R2 expResult = null;
R2 result = instance.closestOnLine(point1, point2);
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 closest on line method of class r2 </s>
|
funcom_train/3289991 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean init() {
super.init();
String propValue = getInitParameter("UrlCaching");
log.debug("init(): Builder property UrlCaching=" + propValue);
if (propValue!=null)
urlCaching = (Boolean.valueOf(propValue)).booleanValue();
return true;
}
COM: <s> initializes and gets builder properties </s>
|
funcom_train/49608794 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RollState getRollState(String username,EntityManager em,int id) throws Throwable {
try {
RollState vo = JPAMethods.find(username, em, RollState.class, id);
if (vo==null)
throw new Exception("No RollState found having id: "+id);
return vo;
}
catch (Throwable ex) {
Logger.error(null, ex.getMessage(), ex);
throw ex;
}
}
COM: <s> retrieve a specific roll state starting from its id </s>
|
funcom_train/50536379 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeConnection(Address mbr) {
SenderEntry entry=send_table.remove(mbr);
if(entry != null)
entry.reset();
ReceiverEntry entry2=recv_table.remove(mbr);
if(entry2 != null) {
NakReceiverWindow win=entry2.received_msgs;
if(win != null)
sendStableMessage(mbr, win.getHighestDelivered(), win.getHighestReceived());
entry2.reset();
}
}
COM: <s> removes and resets from connection table which is already locked </s>
|
funcom_train/32368575 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFindStatusInProgress() {
String testName = "findInProgress";
if (logger.isInfoEnabled()) {
logger.info("\n\t\tRunning Test: " + testName);
}
StudyStatusHome fixture = getStudyStatusHome();
StudyStatus result = fixture.findStatusInProgress();
// verify
assertTrue(result != null);
assertTrue(result.isInProgress());
if (logger.isInfoEnabled()) {
logger.info(testName + " verified.");
}
}
COM: <s> run the study status find status in progress method test </s>
|
funcom_train/36988097 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void _testConfigurationManagerLoadsDefaults() throws Exception {
FacesConfigTag root = ConfigurationManager.getInstance().getRoot();
List components = root.getComponents();
boolean found = false;
for (Iterator iter = components.iterator(); iter.hasNext();) {
ComponentTag element = (ComponentTag) iter.next();
if(element.getComponentType().equalsIgnoreCase("UICommand")) {
found = true;
}
}
assertTrue(found);
}
COM: <s> check that the configurationmanager loads at least the default smile configuration </s>
|
funcom_train/17806068 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSourcePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DefaultConnection_source_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_DefaultConnection_source_feature", "_UI_DefaultConnection_type"),
CtbPackage.Literals.DEFAULT_CONNECTION__SOURCE,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the source feature </s>
|
funcom_train/38270501 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element getDocument(Document doc, String idTag) {
Element channel = getBase(doc, idTag, chanClass, chanEditable, chanHasHelp, chanHasAbout);
channel.setAttribute("description", chanDesc);
addLocales(doc,channel);
addParameters(doc, channel);
return channel;
}
COM: <s> return an xml representation of this channel </s>
|
funcom_train/7661571 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddAllAbsent() {
CopyOnWriteArrayList full = populatedArray(3);
Vector v = new Vector();
v.add(three);
v.add(four);
v.add(one); // will not add this element
full.addAllAbsent(v);
assertEquals(5, full.size());
}
COM: <s> add all absent adds each element from the given collection that did not </s>
|
funcom_train/10521910 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setSOAPAction(String actionURIString) {
if (actionURIString != null && !actionURIString.equals("")) {
_call.setProperty(Call.SOAPACTION_USE_PROPERTY, true);
_call.setProperty(Call.SOAPACTION_URI_PROPERTY, actionURIString);
}
}
COM: <s> set the soapaction uri for the call </s>
|
funcom_train/16623947 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void translateCanvas() {
if (centerPoint != null) {
AffineTransform at = new AffineTransform();
at.setToTranslation((width / 2) - centerPoint.getX(), (height / 2) - centerPoint.getY());
gg.transform(at);
//create a rectangle for the background
backgroundRectangle = new Rectangle2D.Double(centerPoint.getX() - (width / 2), centerPoint.getY() - (height / 2), width, height);
}
}
COM: <s> translates the canvas </s>
|
funcom_train/25374768 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Capabilities getCapabilities() {
Capabilities result = super.getCapabilities();
result.disableAll();
// enable what we can handle
// attributes
result.enable(Capability.NOMINAL_ATTRIBUTES);
result.enable(Capability.MISSING_VALUES);
// class (can handle a nominal class if CAR rules are selected). This
result.enable(Capability.NO_CLASS);
result.enable(Capability.NOMINAL_CLASS);
result.enable(Capability.MISSING_CLASS_VALUES);
return result;
}
COM: <s> returns default capabilities of the classifier </s>
|
funcom_train/25218218 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void log(String message) {
Logger log = getLogger();
if (banner) {
log.log(Level.INFO, LOCALIZER.format("Banner", VERSION, REVISION, //
System.getProperty("java.version")));
banner = false;
}
if (message != null) {
log.log(Level.SEVERE, message);
}
}
COM: <s> write an error message to the log </s>
|
funcom_train/18728220 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetGrayScaleFloat() {
float expResult = 0.0f;
float result = JaxoColor.getGrayScaleFloat(JaxoColor.ORANGE);
assertEquals("Mismatch in getGrayScaleFloat!", expResult, result);
expResult = 1.0f;
result = JaxoColor.getGrayScaleFloat(JaxoColor.WHITE);
assertEquals("Mismatch in getGrayScaleFloat!", expResult, result);
}
COM: <s> test of get gray scale float method </s>
|
funcom_train/1561296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateDataTable(GeoList dataAll){
// load the data model
populateDataTable(dataAll);
// prepare boolean selection list for the checkboxes
selectionList = new Boolean[dataAll.size()];
for(int i=0; i<dataAll.size(); ++i){
selectionList[i] = true;
}
// create a new header
rowHeader = new MyRowHeader(this,dataTable);
scrollPane.setRowHeaderView(rowHeader);
updateFonts(getFont());
// repaint
dataTable.repaint();
rowHeader.repaint();
}
COM: <s> updates the data table </s>
|
funcom_train/39314443 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetOpaque() {
System.out.println("testGetOpaque");
selectTool myAll=new selectTool();
myAll.setOpaque(false);
assertEquals(myAll.getOpaque(), false);
myAll.setOpaque(true);
assertEquals(myAll.getOpaque(), true);
}
COM: <s> test of get opaque method of class select tool </s>
|
funcom_train/25028748 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Node external_tan(Node startAt) throws Exception {
startAt.isGoodArgsCnt(1);
MathContext mc=context.get();
return ExternalTK.createAExtVObject(null, External_Decimal.class.getName(), new External_Decimal(BigDecimalMath.tan(number.get(),mc),mc));
}
COM: <s> retourne la tangente du decimal courant </s>
|
funcom_train/16531749 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void crawl() {
// teste();
addNeighbours();
move();
for (Point p : this.open_list)
this.known_world.setMapCellContent(p.getX(), p.getY(),
1000);
//XRato.viewer.showKnownWorld(this.known_world);
this.known_world.setMapCellContent(start.getX(),start.getY(),KnownWorld.FREE);
this.known_world.setMapCellContent(finish.getX(),finish.getY(),KnownWorld.FREE);
}
COM: <s> performs an iteration of the a algorithm </s>
|
funcom_train/627466 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void broadcast(FacesEvent event) throws AbortProcessingException {
// Perform standard superclass processing
super.broadcast(event);
if (event instanceof ActionEvent) {
// Invoke the default ActionListener
ActionListener listener =
getFacesContext().getApplication().getActionListener();
if (listener != null) {
listener.processAction((ActionEvent) event);
}
}
}
COM: <s> p in addition to to the default </s>
|
funcom_train/48382772 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setItemsForSection(ItemType itemType, List<? extends Item> items) {
assert !itemType.isIndexedItem();
SparseArray<Item> sa = itemsByType[itemType.SectionIndex];
sa.ensureCapacity(items.size());
for (Item item: items) {
sa.append(item.getOffset(), item);
}
}
COM: <s> sets the items for the specified section </s>
|
funcom_train/42949388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadDefaults(Object[] keysAndValues) {
for (int i = 0, c = keysAndValues.length; i < c; i = i + 2) {
UIManager.getLookAndFeelDefaults().put(keysAndValues[i], keysAndValues[i + 1]);
}
}
COM: <s> adds the given defaults in uimanager </s>
|
funcom_train/25084365 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void pop(char c) throws JSONException {
if (this.top <= 0 || this.stack[this.top - 1] != c) {
throw new JSONException(ExceptionMessage.NESTING_ERROR.toString());
}
this.top -= 1;
this.mode = this.top == 0 ? 'd' : this.stack[this.top - 1];
}
COM: <s> pop an array or object scope </s>
|
funcom_train/4049106 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateRegistry(Registry reg, InstructionList insList, InstructionHandle referIns) {
InstructionHandle first = (insList).getStart();
Stack s = new Stack(reg.getStack(referIns));
s.removeFirstUninitializedValues();
Frame f = new Frame(reg.getFrame(referIns));
reg.register(first, s);
reg.register(first, f);
}
COM: <s> this method was created in visual age </s>
|
funcom_train/51418456 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addOutputFileNamePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_FileNode_outputFileName_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_FileNode_outputFileName_feature", "_UI_FileNode_type"),
JetsetPackage.Literals.FILE_NODE__OUTPUT_FILE_NAME,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the output file name feature </s>
|
funcom_train/44414178 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getQueuePosition() throws CorruptPacketException {
try{
return ((long)packetBuffer.getInt())&0xFFffFFff;
} catch (BufferUnderflowException bufe) {
throw new CorruptPacketException(Convert.byteBufferToHexString(packetBuffer, 0, Math.min(packetLength, 256)), bufe);
}
}
COM: <s> provides the position on a peers uploadqueue </s>
|
funcom_train/26213639 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IOException handleException(IOException ioe) {
// keep the original value of used, as it will be set to false by close().
boolean tempUsed = used;
HttpConnection.this.close();
if (tempUsed) {
LOG.debug(
"Output exception occurred on a used connection. Will treat as recoverable.",
ioe
);
return new HttpRecoverableException(ioe.toString());
} else {
return ioe;
}
}
COM: <s> closes the connection and conditionally converts exception to recoverable </s>
|
funcom_train/25763239 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JSplitPane getJSplitPane() {
if (jSplitPane == null) {
jSplitPane = new JSplitPane();
jSplitPane.setRightComponent(getJPanel1());
jSplitPane.setLeftComponent(getJPanel2());
jSplitPane.setOneTouchExpandable(true);
}
return jSplitPane;
}
COM: <s> this method initializes j split pane </s>
|
funcom_train/6404777 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(float dt) {
float dtSquared = dt * dt;
if (invMass == 0) return;
float x = position.x, y = position.y, z = position.z;
position.set(
2*position.x - oldPos.x + acceleration.x * dtSquared,
2*position.y - oldPos.y + acceleration.y * dtSquared,
2*position.z - oldPos.z + acceleration.z * dtSquared);
oldPos.set(x, y, z);
}
COM: <s> verlet update of point location </s>
|
funcom_train/45231135 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String prettyPrintParams() {
StringBuffer sb = new StringBuffer();
Iterator <VSMParm> i = iterator();
while (i.hasNext()) {
sb.append(i.next().prettyPrint());
sb.append("\n");
}
return sb.toString();
}
COM: <s> prettyprint to a string each param in the array </s>
|
funcom_train/8331198 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Frame createDialogParentFrame() {
if (!display.equals(Display.getCurrent())) {
SWT.error(SWT.ERROR_THREAD_INVALID_ACCESS);
}
Shell parent = display.getActiveShell();
if (parent == null) {
throw new IllegalStateException("No Active Shell"); //$NON-NLS-1$
}
return createDialogParentFrame(parent);
}
COM: <s> creates an awt frame suitable as a parent for awt swing dialogs </s>
|
funcom_train/19964652 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveOrganizationsXml(Organizations organizations) throws JAXBException, IOException {
String orgFilePath = "/xml/examples/organizations.save.xml";
Marshaller marshaller = this.organizationsJaxbContext.createMarshaller();
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
marshaller.marshal(organizations, new FileOutputStream(cwd + orgFilePath));
}
COM: <s> saves organizations to an xml file </s>
|
funcom_train/3594043 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Node getFilter(String elementname) {
List list = getFilterList();
Node result = null;
for (int i = 0; (result == null) && (i < list.size()); i++) {
Node filter = (Node)list.get(i);
if (getFilterElementName(filter).equals(elementname))
result = filter;
}
return result;
}
COM: <s> p returns the filter element for the specified element name </s>
|
funcom_train/37035344 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void destroyMBeans() {
try {
destroyMBeans(ServerFactory.getServer());
} catch (MBeanException t) {
Exception e = t.getTargetException();
if (e == null) {
e = t;
}
log("destroyMBeans: MBeanException", e);
} catch (Throwable t) {
log("destroyMBeans: Throwable", t);
}
}
COM: <s> destroy the mbeans that correspond to every existing node of our tree </s>
|
funcom_train/8688276 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getClassEntry(String className) {
int index = -1;
for (int i = 0; i < entries.size() && index == -1; ++i) {
Object element = entries.elementAt(i);
if (element instanceof ClassCPInfo) {
ClassCPInfo classinfo = (ClassCPInfo) element;
if (classinfo.getClassName().equals(className)) {
index = i;
}
}
}
return index;
}
COM: <s> get the index of a given constant class entry in the constant pool </s>
|
funcom_train/44626129 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Test public void testClassMods10() {
helpTCF("t/A.java","package t; \n public /*@ pure */ @Pure class A{}",
"/t/A.java:2: cannot find symbol\n symbol: class Pure", 22
);
// checkMessages();
}
COM: <s> testing annotations without the import </s>
|
funcom_train/5380770 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private AccessibleListener getAccessibleListener() {
return new AccessibleAdapter() {
public void getName(AccessibleEvent e) {
if (e.childID != ACC.CHILDID_SELF) {
ToolItem item = toolBar.getItem(e.childID);
if (item != null) {
String toolTip = item.getToolTipText();
if (toolTip != null) {
e.result = toolTip;
}
}
}
}
};
}
COM: <s> get the accessible listener for the tool bar </s>
|
funcom_train/41488871 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void commandAction(Command c, Displayable d) {
if (c == EXIT_CMD) {
parent.destroyApp(true);
parent.notifyDestroyed();
return;
}
if (c == OK_CMD) {
// will be moved to menu and canvas themselves
if (!isGraphicMenu)
parent.menuCommand(menu.getSelectedIndex());
else {
parent.menuCommand(canvas.getSelectedIndex());
}
// -----
}
}
COM: <s> responds to commands issued on client or server form </s>
|
funcom_train/19614302 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MSAFluidSolver2D setup(int NX, int NY) {
setDeltaT(FLUID_DEFAULT_DT);
setFadeSpeed(FLUID_DEFAULT_FADESPEED );
setSolverIterations(FLUID_DEFAULT_SOLVER_ITERATIONS);
_NX = NX;
_NY = NY;
_numCells = (_NX + 2) * (_NY + 2);
_invNumCells = 1.0f/ _numCells;
// reset();
_invNX = 1.0f / _NX;
_invNY = 1.0f / _NY;
width = getWidth();
height = getHeight();
invWidth = 1.0f/width;
invHeight = 1.0f/height;
reset();
enableRGB(false);
return this;
}
COM: <s> optional setup re initialize solver and setup number of cells </s>
|
funcom_train/4361774 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getRemoteHost() {
if (remoteHost == null) {
if (!connector.getEnableLookups()) {
remoteHost = getRemoteAddr();
} else {
coyoteRequest.action
(ActionCode.ACTION_REQ_HOST_ATTRIBUTE, coyoteRequest);
remoteHost = coyoteRequest.remoteHost().toString();
}
}
return remoteHost;
}
COM: <s> return the remote host name making this request </s>
|
funcom_train/13297969 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addRelatedIssuePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Variable_relatedIssue_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Variable_relatedIssue_feature", "_UI_Variable_type"),
NegotiationPackage.Literals.VARIABLE__RELATED_ISSUE,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the related issue feature </s>
|
funcom_train/28476827 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerVM(String vmxFilePath) throws VixException {
VixHandle jobHandle = VixWrapper.VixHost_RegisterVM(
hostHandle, vmxFilePath, null, null);
try {
/*List result =*/ VixWrapper.VixJob_Wait(jobHandle, Collections.EMPTY_LIST);
} finally {
VixWrapper.Vix_ReleaseHandle(jobHandle);
}
return;
}
COM: <s> this function adds a virtual machine to the hosts inventory </s>
|
funcom_train/45251465 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean selectionHasInfo(AboutBundleData bundleInfo) {
URL infoURL = getMoreInfoURL(bundleInfo, false);
// only report ini problems if the -debug command line argument is used
if (infoURL == null && WorkbenchPlugin.DEBUG) {
WorkbenchPlugin.log("Problem reading plugin info for: " //$NON-NLS-1$
+ bundleInfo.getName());
}
return infoURL != null;
}
COM: <s> check if the currently selected plugin has additional information to </s>
|
funcom_train/23442717 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addFinalDefaultPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_SchemaType_finalDefault_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_SchemaType_finalDefault_feature", "_UI_SchemaType_type"),
SchemaPackage.Literals.SCHEMA_TYPE__FINAL_DEFAULT,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the final default feature </s>
|
funcom_train/22606950 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer sb = new StringBuffer("Reference[url=");
sb.append(url);
sb.append(",versions=\"");
for (int i = 0; i < versions.length; i++) {
sb.append(versions[i]);
if (i < versions.length - 1) {
sb.append(' ');
}
}
sb.append(lazy ? "\",lazy]" : "\",eager]");
return sb.toString();
}
COM: <s> converts this reference to a string </s>
|
funcom_train/32060795 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fitBar() {
if (barlength >= getScrollLength()) {
barlength = getScrollLength();
barpos = minval;
} else { // barlength is smaller than whole length
if(barpos < minval) {
barpos = minval;
} else if(getBarEndPos() > maxval) {
barpos = maxval - barlength + 1;
}
}
}
COM: <s> changes the position and length of the bar as needed to fit between </s>
|
funcom_train/46982764 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean questionMessage(String question,String type){
return DialogPane.showConfirmDialog(mainWindow.getMainFrame(),question,type,JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE)==JOptionPane.YES_OPTION;
}
COM: <s> ask a question to user and return true is user chooses yes </s>
|
funcom_train/43423247 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setVerbosity(int verbosity) throws SparkException {
if ((verbosity < 0) || (verbosity > 3)) {
logger.severe("Verbosity level out of range (from 0: MUTE to 3: VERBOSE) !");
throw new SparkException("Verbosity level out of range (from 0: MUTE to 3: VERBOSE) ! ");
} else {
this.verbosity = verbosity;
}
}
COM: <s> set the level of verbosity of the logger </s>
|
funcom_train/3023312 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void reportAverageParameters(ProjectMetrics projectData) {
// Public Methods
double top = projectData.getParameterTotal();
double bottom = projectData.getMethodTotal();
System.out.println("[008] " + projectData.getParameterTotal() + " total number of parameters in " + projectData.getMethodTotal() + " methods.");
System.out.println("[008] " + "Average: " + (top / bottom));
}
COM: <s> reports on the average number of parameters </s>
|
funcom_train/10269388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dispatch(ChibaEvent event) throws XFormsException {
super.dispatch(event);
if (event.getEventName().equalsIgnoreCase("http-request")) {
HttpServletRequest request = (HttpServletRequest) event.getContextInfo();
getHttpRequestHandler().handleRequest(request);
} else {
LOGGER.warn("ignoring unknown event '" + event.getEventName() + "'");
}
}
COM: <s> servlet adapter knows and executes only one chiba event http request </s>
|
funcom_train/7276442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean allowLeafDemotion() {
_leafTries++;
if (UltrapeerSettings.FORCE_ULTRAPEER_MODE.getValue() || isActiveSupernode())
return false;
else if(nodeAssigner.get().isTooGoodUltrapeerToPassUp() && _leafTries < _demotionLimit)
return false;
else
return true;
}
COM: <s> returns true if this can safely switch from ultrapeer to leaf mode </s>
|
funcom_train/37062240 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void rebuildContainer() {
// computes the width and height of the border layout panels
sizeAndAddBorderLayoutPanels();
// computes the width and height of the box layout panels
sizeAndAddBoxContainerPanels();
// create and add the inner digital display panels (integers, doubles, time)
createDigitsPanels();
}
COM: <s> removes sizes and adds the margin and container panels </s>
|
funcom_train/5894529 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void renderWidgetListeners(Map<String, String> listeners) {
if (listeners == null || listeners.isEmpty())
return;
renderName("listeners");
_buf.append('{');
for (Iterator it = listeners.entrySet().iterator(); it.hasNext();) {
final Map.Entry me = (Map.Entry)it.next();
_buf.append(me.getKey()).append(":function(event){\n")
.append(me.getValue()).append("\n},");
}
_buf.setCharAt(_buf.length() - 1, '}');
}
COM: <s> renders the java script code snippet for event listeners </s>
|
funcom_train/44871900 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reportError(String message) {
if (message == null)
clearErrorMessage();
if (errorReporter != null) {
errorReporter.setErrorMessage(this, message);
errorMessage = message;
} else if (parent != null)
parent.reportError(errorMessage);
else {
errorMessage = message;
System.out.println("***** Error: " + errorMessage);
}
}
COM: <s> report the specified error message </s>
|
funcom_train/1662810 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void rebuildContainerComboBox() {
/* scan files for containers */
List<String> files = getProjectFiles();
List<String> containers = new ArrayList<String>(); // ComboBoxModel
// sucks. No
// contains()!
containers.add("");
for (String filename : files) {
String container = project.getFileOption(filename).getContainer();
if (!containers.contains(container)) {
containers.add(container);
}
}
Collections.sort(containers);
containerComboBoxModel.removeAllElements();
for (String container : containers) {
containerComboBoxModel.addElement(container);
}
}
COM: <s> updates the container combo box model </s>
|
funcom_train/39570262 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Object obj) {
Id oth = (Id) obj;
for (int i = nlen - 1; i >= 0; i--) {
if (Id[i] != oth.Id[i]) {
long t = Id[i] & 0x0ffffffffL;
long o = oth.Id[i] & 0x0ffffffffL;
if (t < o) {
return -1;
} else {
return 1;
}
}
}
return 0;
}
COM: <s> comparison operator for ids </s>
|
funcom_train/31822023 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Backlog toBacklog() {
BacklogDataObject backlog = new BacklogDataObject(this.width, this.height, this.locationX, this.locationY);
backlog.setId(this.id);
backlog.setParent(this.parent);
for(int i = 0; i<this.storycards.length; i++) {
backlog.addStoryCard(storycards[i].toStoryCard());
}
return backlog;
}
COM: <s> converts from ws backlog to persister </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.