__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/13599340 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void endAll() {
if (taskInstances!=null) {
Iterator iter = taskInstances.iterator();
while (iter.hasNext()) {
TaskInstance taskInstance = (TaskInstance) iter.next();
if (!taskInstance.hasEnded()) {
taskInstance.end();
}
}
}
}
COM: <s> convenience method to end all tasks related to a given process instance </s>
|
funcom_train/37476724 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Node getNode(String name) {
for (Iterator it = getAllNodes().iterator(); it.hasNext(); ) {
Node node = (Node) it.next();
if (node.getName().equals(name)) {
return node;
}
}
Logger.ERROR("Node with name " + name + " was not found in Workflow " + getId());
return null;
}
COM: <s> check if there is a node with a given name in the </s>
|
funcom_train/47614370 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private long calculateProductDiagonallyRU(int x, int y) {
if (x < matrix[y].length - 3 && y > 2) {
return matrix[y][x] * matrix[y - 1][x + 1] * matrix[y - 2][x + 2] * matrix[y - 3][x + 3];
}
else {
return 0;
}
}
COM: <s> calculate product diagonally in the right up direction </s>
|
funcom_train/43895912 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void validate(Object obj) throws IllegalArgumentException {
for (int i = 0; i < children.length; i++) {
try {
children[i].validate(obj);
return; // validates
} catch (IllegalArgumentException e) {
// ignore ... try the next
}
}
throw new IllegalArgumentException("Could not be validated :(");
}
COM: <s> goes through the children and searches for a validator that works </s>
|
funcom_train/18657733 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object arg0) {
if (arg0 instanceof DonkeyServer) {
DonkeyServer server = (DonkeyServer)arg0;
if (server.getSocketAddress().equals(socketAddress))
// FIXME: here should be better checking for equality, i.e. by name ...
return true;
else if (staticDns)
if (server.getStaticDns().equals(staticDnsName)) {
return true;
}
}
return false;
}
COM: <s> tells if another donkey server equals to this </s>
|
funcom_train/2305793 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean checkValidityOfShare(String str) throws Exception {
Logging.loggerRef.info("METHOD CALLED :checkValidityOfShare");
boolean inValid = false;
/*Invalid keywords*/
str = str.trim();
String invalidKeywords[] = new String[]{"global","profiles","netlogon","printers","c","homes"};
for (int k = 0; k < invalidKeywords.length;k++) {
if (str.indexOf(invalidKeywords[k]) >= 0) {
inValid = true;
return inValid;
}
}
return inValid;
}
COM: <s> function checks the validity of shares </s>
|
funcom_train/45538690 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void internalBeginReporting(boolean insideReportingSequence) {
if (fCompilationUnit != null && fCompilationUnit.getJSCProject().isOnClasspath(fCompilationUnit)) {
ProblemRequestorState state= new ProblemRequestorState();
state.fInsideReportingSequence= insideReportingSequence;
state.fReportedProblems= new ArrayList();
synchronized (getLockObject()) {
fProblemRequestorState.set(state);
++fStateCount;
}
}
}
COM: <s> sets up the infrastructure necessary for problem reporting </s>
|
funcom_train/47184452 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String sendEmail(long patientMID, String message) throws DBException{
String rValue;
List<String> toList = new ArrayList<String>();
PatientBean receiver = patientDAO.getPatient(patientMID);
toList.add(receiver.getEmail());
Email mail = new Email();
mail.setBody(message);
mail.setFrom(loggedInMID + "");
mail.setToList(toList);
emailer.sendEmail(mail);
rValue = "" + mail.getFrom() + " " + mail.getBody();
return rValue;
}
COM: <s> sends an e mail to a patient requesting more information </s>
|
funcom_train/6254865 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private PasswordAuthentication getPassword(final String protocol) {
return (PasswordAuthentication) AccessController.doPrivileged(
new PrivilegedAction() {
public Object run() {
InetAddress addr = null;
try {
addr = InetAddress.getByName(host);
} catch (UnknownHostException ex) {
}
return Authenticator.requestPasswordAuthentication(
addr, port, protocol, authRealm, authScheme);
}
}
);
}
COM: <s> obtains password authentication from the currently installed </s>
|
funcom_train/43692870 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
try {
MarcXmlHandler handler = new MarcXmlHandler(queue);
MarcXmlParser parser = new MarcXmlParser(handler);
if (th == null)
parser.parse(input);
else
parser.parse(input, th);
}
catch (MarcException me)
{
queue.passException(me);
}
finally {
queue.end();
}
}
COM: <s> creates a new code marc xml handler code instance registers the </s>
|
funcom_train/7599692 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printTree() {
if(!PelletOptions.PRINT_ABOX) return;
System.err.println("PRINTING...");
Iterator n = getIndIterator();
while(n.hasNext()) {
Individual node = (Individual) n.next();
if( !node.isRoot() )
continue;
printNode(node, new HashSet(), " ");
}
}
COM: <s> print the abox as a completion tree child nodes are indented </s>
|
funcom_train/27975812 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NetPortSpecification getSpecification() {
NetPortSpecification spec = new NetPortSpecification();
spec.setAddress( getAddress() );
// Add each Concourse's specification
Set<ConcourseSpecification> concourseSpecs = new HashSet<ConcourseSpecification>();
for ( Concourse concourse : getConcourses() ) {
concourseSpecs.add( concourse.getSpecification() );
}
spec.setConcourseSpecifications( concourseSpecs );
return spec;
}
COM: <s> returns the specification for this code net port code including </s>
|
funcom_train/16695295 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean contains(Enumerator value) {
if (value.getClass() != this.enumeratorClass) {
throw new EnumeratorSetTypeException(
"Cannot check value of type \""
+ value.getClass()
+ "\" within set of different type \""
+ this.enumeratorClass
+ "\""
);
}
return this.values.contains(value);
}
COM: <s> check whether this set contains the given value </s>
|
funcom_train/42638642 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSomeInitialValues(Number[] ys){
int numberOfInitialValuesProposed = 0;
Vector tmpVector = getBoundaryProblem().getCondition0().getC().copyVector();
for (int i = 0; i < tmpVector.size(); i++)
{
if (tmpVector.get(i) == null){
tmpVector.set(i, ys[numberOfInitialValuesProposed]);
numberOfInitialValuesProposed++;
}
}
setInitial(tmpVector);
}
COM: <s> sets ys as a part of initial values vector for initial values problem </s>
|
funcom_train/4014942 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected DesignWidgetWrapper addNewTextBox(boolean select){
TextBoxWidget tb = new TextBoxWidget();
DOM.setStyleAttribute(tb.getElement(), "height","25"+PurcConstants.UNITS);
DOM.setStyleAttribute(tb.getElement(), "width","200"+PurcConstants.UNITS);
return addNewWidget(tb,select);
}
COM: <s> adds a new text box to the selected page </s>
|
funcom_train/32081033 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStyle(int style) {
if ((style & SWT.BOLD) == SWT.BOLD) {
weight = OS.FontWeight_ToOpenTypeWeight(OS.FontWeights_Bold);
} else {
weight = OS.FontWeight_ToOpenTypeWeight(OS.FontWeights_Normal);
}
if ((style & SWT.ITALIC) == SWT.ITALIC) {
this.style = OS.FontStyles_Italic;
} else {
this.style = OS.FontStyles_Normal;
}
}
COM: <s> sets the style of the receiver to the argument which must </s>
|
funcom_train/43392596 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doDeleteInstance(ActionRequest request, ActionResponse response) throws PortletException {
doDetails(request, response);
RealWorkflowUtils.getInstance().deleteWorkflowInstance(request.getRemoteUser(), request.getParameter("workflow"), request.getParameter("rtid"));
}
COM: <s> deletion of workflow instance </s>
|
funcom_train/21487594 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getPROCESS_COMMAND() {
if (PROCESS_COMMAND == null) {//GEN-END:|30-getter|0|30-preInit
// write pre-init user code here
PROCESS_COMMAND = new Command("Process", Command.ITEM, 0);//GEN-LINE:|30-getter|1|30-postInit
// write post-init user code here
}//GEN-BEGIN:|30-getter|2|
return PROCESS_COMMAND;
}
COM: <s> returns an initiliazed instance of process command component </s>
|
funcom_train/36816017 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Cell getCellAt(Location loc){
Vector<Cell> currentCol;
if(loc.x>maxX){
for(int i=maxX; i<=loc.x;i++){
cellTable.add(new Vector<Cell>());
}
maxX = loc.x;
}
currentCol = cellTable.elementAt(loc.x);
if(loc.y>=currentCol.size()){
for(int i=currentCol.size(); i<=loc.y; i++){
currentCol.add(new Cell());
}
if(loc.y>maxY){
maxY=loc.y;
}
}
return (cellTable.elementAt(loc.x)).elementAt(loc.y);
}
COM: <s> return the cell itself at a location if that cell </s>
|
funcom_train/43468756 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ZX getZx() {
/**
* Exit Early if a valid handle to zX.
*/
if (this.not_null && !this.zx.isInCached()) {
return this.zx;
}
this.zx = ThreadLocalZX.getZX();
this.not_null = true;
return this.zx;
}
COM: <s> get the current zx handle </s>
|
funcom_train/165026 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDescription() {
String desc = getValue();
if (Utils.isNullOrEmpty(desc)) {
desc = getName();
if (Utils.isNullOrEmpty(desc)) {
if (isRecipient()) {
desc = "(recipient)";
} else if (isSender()) {
desc = "(sender)";
} else {
desc = "(unknown)";
}
}
}
return desc;
}
COM: <s> returns a descriptive name of the field </s>
|
funcom_train/44136939 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void notifyObjectSelection(OSMElement elt, boolean isMedia) {
super.notifyObjectSelection(elt, isMedia);
this.m_Title.selectByElement(elt);
this.m_Body.selectByElement(elt);
if(!isMedia)
this.m_Medias.selectByElement(elt);
}
COM: <s> to notify an object has been selected </s>
|
funcom_train/1152161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getItemCommand25() {
if (itemCommand25 == null) {//GEN-END:|429-getter|0|429-preInit
// write pre-init user code here
itemCommand25 = new Command("Escuchar", Command.ITEM, 0);//GEN-LINE:|429-getter|1|429-postInit
// write post-init user code here
}//GEN-BEGIN:|429-getter|2|
return itemCommand25;
}
COM: <s> returns an initiliazed instance of item command25 component </s>
|
funcom_train/26267921 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void refresh() {
Map key = getKeyValues();
try {
if (Maps.isEmptyOrZero(key)) clear();
else setValues(MapFacade.getValues(getModelName(), key, getMembersNamesWithHidden()), false);
refreshCollections();
}
catch (FinderException ex) {
getErrors().add("object_with_key_not_found", getModelName(), key);
clear();
}
}
COM: <s> refresh the displayed data from database </s>
|
funcom_train/11514610 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public E next() throws NoSuchElementException {
if (iterator instanceof ListIterator) {
return iterator.next();
}
if (currentIndex < wrappedIteratorIndex) {
++currentIndex;
return list.get(currentIndex - 1);
}
E retval = iterator.next();
list.add(retval);
++currentIndex;
++wrappedIteratorIndex;
removeState = true;
return retval;
}
COM: <s> returns the next element from the iterator </s>
|
funcom_train/50769468 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addFilterActualParameters(Vector namev) {
String name;
int j;
for (j = 0; j < namev.size(); j++) {
name = (String) namev.elementAt(j);
if (parsingInput) {
inf.addParameter(name);
} else {
of.addParameter(name);
}
}
}
COM: <s> adds parameters to an input or outputfilter </s>
|
funcom_train/38971688 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean saveIfChanged() throws IOException {
if (!hasChanged()) {
return true;
}
int result = JOptionPane.showConfirmDialog(this,
translator.i18n("Changes were made.\nDo you want to save?"),
translator.i18n("Save"), JOptionPane.YES_NO_CANCEL_OPTION,
JOptionPane.QUESTION_MESSAGE);
if (result == JOptionPane.CANCEL_OPTION) {
return false;
}
if (result == JOptionPane.NO_OPTION) {
return true;
}
saveFile();
return true;
}
COM: <s> this method checks whether the content of the file was changed or not </s>
|
funcom_train/50620781 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean generateOutput( List modelElementList, String modelStereotype) {
boolean generateOutput = false;
for (Iterator ime = modelElementList.iterator(); ime.hasNext();) {
ModelElement modelElement = (ModelElement) ime.next();
if ( modelElement.hasStereotype(modelStereotype) )
generateOutput = true;
}
return generateOutput;
}
COM: <s> determine if this writer will produce any output </s>
|
funcom_train/7866348 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void login(String user, String pass) throws AuthenticationException, RuntimeException {
if (user == null || pass == null) {
throw new RuntimeException("null login credentials");
}
this.username = user;
this.password = pass;
this.authSubToken = "";
service.setUserCredentials(user, pass);
spreadsheetsService.setUserCredentials(user, pass);
}
COM: <s> set user credentials based on a username and password </s>
|
funcom_train/2023320 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String fixAdditionalArg(String arg) {
StringTokenizer tok;
String tmp;
// fix additional
tok = new StringTokenizer(arg, " ");
arg = "";
while (tok.hasMoreTokens()) {
tmp = tok.nextToken();
if (tmp.startsWith("="))
tmp = "-" + tmp.substring(1);
arg += tmp + " ";
}
arg = arg.trim();
return arg;
}
COM: <s> changes the to again necessary since the arguments are treated </s>
|
funcom_train/23267821 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetMonto() {
System.out.println("getMonto");
Movimientos instance = new Movimientos();
double expResult = 0.0;
double result = instance.getMonto();
assertEquals(expResult, result, 0);
// 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 monto method of class capa negocios </s>
|
funcom_train/23868135 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getRequiredInitParameter(final String parameterName) throws UnavailableException {
String parameterValue = null;
if (parameterName != null) {
parameterValue = getInitParameter(parameterName);
}
if (parameterValue == null) {
throw new UnavailableException("Init parameter:" + parameterName + ", is missing!");
}
return parameterValue;
}
COM: <s> gets a required initialization parameter </s>
|
funcom_train/17671028 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void traverseForInDepthComments(Node m) {
SpecialNode sn = (SpecialNode)m;
if(sn.getId() == 110) {
CommentToken ct = new CommentToken(sn, sn.jjtGetParent(), sn.getLineNumber());
parser.addToInDepthComments(ct);
}
if(children != null) {
for(int i = 0; i < children.length; ++i) {
Node n = (Node)children[i];
if(n != null) {
n.traverseForInDepthComments(n);
}
}
}
}
COM: <s> method for traversing along comment nodes only creating tokens </s>
|
funcom_train/14276094 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean selectByPrimary(TileID id) throws SQLException {
PreparedStatement pstmt = connection.prepareStatement("SELECT id FROM " + table + " WHERE id=?");
pstmt.setInt(1, id.getValue());
ResultSet ret = pstmt.executeQuery();
boolean result = ret.next();
pstmt.close();
return result;
}
COM: <s> checks whether the specified row exists </s>
|
funcom_train/4404263 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setLambda(int lambda) {
if (arx != null)
if (arx.length != 0 && arx.length != lambda) {
flgLambdaChanged = 1;
if (1 < 3)
error("population size cannot be changed at this point");
}
// TODO: make population size dynamic
// effected are arx, arxrepaired,...??...
// only at state==0 and 3 sensible?
this.lambda = lambda;
}
COM: <s> setter for offspring population size alias sample size alias lambda </s>
|
funcom_train/4416954 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object get(String key) throws JSONException {
if (key == null) {
throw new JSONException("Null key.");
}
Object object = this.opt(key);
if (object == null) {
throw new JSONException("JSONObject[" + quote(key) +
"] not found.");
}
return object;
}
COM: <s> get the value object associated with a key </s>
|
funcom_train/18513263 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void closeFile(XmlFile file) {
refTable.removeRef(file);
if (refTable.getRefNumber(file) == 0) {
// removes the file from the lists of open ones
refTable.remove(file);
useTable.remove(file);
// closes the associated display
editor.getXmlDisplaysManager().closeDisplay(file.getXmlDisplay());
}
}
COM: <s> called when a file is closed </s>
|
funcom_train/12258603 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Content getFromCache(IdVersion idVersion, String workspace) throws MalformedContentException, ContentNotFoundException {
try {
return getFromCache(ContentUrlFactory.generateScribeLocalUrl(idVersion.id, workspace));
} catch (ContentUriSyntaxException e) {
throw new CMSRuntimeException("Unexpected exception: ContentUriSyntaxException");
} catch (UnsupportedContentScheme e) {
throw new CMSRuntimeException("Unexpected exception: UnsupportedContentScheme");
}
}
COM: <s> removes a content from cache </s>
|
funcom_train/9501819 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showDrawingPadPopup(Component invoker, Point p) {
// clear highlighting and selections in views
app.getEuclidianView().resetMode();
// menu for drawing pane context menu
ContextMenuGraphicsWindow popupMenu = new ContextMenuGraphicsWindow(app,
p.x, p.y);
popupMenu.show(invoker, p.x, p.y);
}
COM: <s> displays the zoom menu at the position p in the coordinate space of </s>
|
funcom_train/2750226 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initHDIVState(WebApplicationContext wac, HttpSessionEvent httpSessionEvent) {
String hdivParameterName = null;
Boolean isRandomName = (Boolean) wac.getBean("randomName");
if (Boolean.TRUE.equals(isRandomName)) {
hdivParameterName = HDIVUtil.createRandomToken(Integer.MAX_VALUE);
} else {
hdivParameterName = (String) wac.getBean("hdivParameter");
}
httpSessionEvent.getSession().setAttribute(Constants.HDIV_PARAMETER, hdivParameterName);
}
COM: <s> hdiv state parameter initialization </s>
|
funcom_train/10814047 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Scriptable pigMapToJS(Map<String, Object> map, Schema schema, int depth) {
debugConvertPigToJS(depth, "Map", map, schema);
Scriptable object = jsScriptEngine.jsNewObject();
for (Entry<String, Object> entry : map.entrySet()) {
object.put(entry.getKey(), object, entry.getValue());
}
debugReturn(depth, object);
return object;
}
COM: <s> converts a map to javascript object based on a schema </s>
|
funcom_train/124354 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveToFile() {
File file = FileSupport.getInstance().saveTextFile(
TopFrameReference.getTopFrameRef());
String text = resultTextArea.getText();
text = UString.replaceAllSubStrings(text, "\n", "\r\n");
if (file != null)
FileSupport.getInstance().saveStringToFile(file, text, false);
}
COM: <s> saves the text in this component to a file </s>
|
funcom_train/28756873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSuffix(String newVal) {
if ((newVal != null && this.suffix != null && (newVal.compareTo(this.suffix) == 0)) ||
(newVal == null && this.suffix == null && suffix_is_initialized)) {
return;
}
this.suffix = newVal;
suffix_is_modified = true;
suffix_is_initialized = true;
}
COM: <s> setter method for suffix </s>
|
funcom_train/49317966 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JButton makeCatalogButton() {
if (catalogButton == null) {
catalogButton = makeButton(((NavigatorImageDisplay) imageDisplay).getCatalogBrowseAction());
}
updateButton(catalogButton,
_I18N.getString("catalogs"),
Resources.getIcon("Catalog24.gif"));
return catalogButton;
}
COM: <s> make the catalog button if it does not yet exists </s>
|
funcom_train/27786185 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addMessage(String text) {
if(lines == TRUNCATE_LINE) {
buffer.append("\n");
buffer.append(Locale.getString("REPORT_TRUNCATED", TRUNCATE_LINE));
}
else if(lines < TRUNCATE_LINE) {
buffer.append(text);
buffer.append("\n");
}
lines++;
}
COM: <s> add a message to the report </s>
|
funcom_train/45450816 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getImagePath() {
StringBuilder path = new StringBuilder(this.organization.getDirectory());
path.append(Constants.NAVIGATOR_PATH);
path.append("/").append(this.imageFile);
path.append(Constants.IMAGE_FILE_EXTENSION);
return path.toString();
}
COM: <s> returns the image path in the form organization url name navigator image file </s>
|
funcom_train/19544345 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private File getDataFile(Object fileRef) {
File file = null;
if (fileRef instanceof String) {
Utilities.checkGameFile((String)fileRef, true);
file = new File(Utilities.GAME_SETTINGS_FILE_DIR, (String)fileRef + SETTINGS_FILE_TYPE);
knownSettingsFiles.addKnownSettingsFile(file);
} else {
file = (File)fileRef;
}
return file;
}
COM: <s> convert a file reference into an actual file </s>
|
funcom_train/25418806 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isValueEmpty() {
boolean bIsEmpty = true;
if (isSingleValue()) {
bIsEmpty = (getSingleValue().getValue().length() == 0);
} else {
for (ContentValue value: getMultipleValues()) {
if (value.getValue().length() > 0) {
bIsEmpty = false;
break;
}
}
}
return bIsEmpty;
}
COM: <s> determines if the node value s is are empty </s>
|
funcom_train/6345617 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String describe() {
StringBuffer sb = new StringBuffer("[DataSource: OFFSET=0x");
sb.append(Long.toHexString(offset));
sb.append(", SIZE=0x");
sb.append(Long.toHexString(size));
sb.append(", name=");
sb.append(name);
sb.append(", type=");
sb.append(type.toString());
sb.append(", minHeartbeat=");
sb.append(minimumHeartbeat);
sb.append(", min=");
sb.append(minimum);
sb.append(", max=");
sb.append(maximum);
sb.append("]");
sb.append("\n\t\t");
sb.append(pdpStatusBlock.toString());
return sb.toString();
}
COM: <s> returns a summary the contents of this data source </s>
|
funcom_train/37866847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void serializeTypePostNode(NodeValue item) throws SAXException {
switch(item.getType()) {
case Type.DOCUMENT:
receiver.endElement(ELEM_DOC_QNAME);
break;
case Type.ATTRIBUTE:
receiver.endElement(ELEM_ATTR_QNAME);
break;
case Type.TEXT:
receiver.endElement(ELEM_TEXT_QNAME);
break;
default:
}
}
COM: <s> writes an end element for document attribute and text nodes </s>
|
funcom_train/4527347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String expandCommand(final String cmd) {
String expCmd = cmd;
expCmd = expCmd.replaceAll("NAMENODE", namenode);
expCmd = expCmd.replaceAll("CLITEST_DATA", clitestDataDir);
expCmd = expCmd.replaceAll("USERNAME", username);
return expCmd;
}
COM: <s> expand the commands from the test config xml file </s>
|
funcom_train/35953999 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void tokenize() throws IOException {
// TODO pass config down
this.taskStatus.setNote("Tokenizing comparison set");
this.tokenizer.tokenize(this.set, new BackgroundTaskStatus("tokenize-"+this.set.getId()));
this.taskSegment.incrementValue();
}
COM: <s> tokenize the comparison set </s>
|
funcom_train/3924013 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toLogEntry() {
return getTime() + " " +
getClient().getClassName() + " " +
getClient().getId() + " " +
getClassName() + " " +
getId() + " " +
getEventName() + " " +
getEventValue() + ";";
}
COM: <s> returns request string suitable for logging </s>
|
funcom_train/47703072 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setParametersForRun(ParametersForRun param) throws Exception {
ConfigurationReader cr = new ConfigurationReader();
this.expectModule = ReplicationConst.REPL_SHELL_MODULE;
this.master = (Master) cr.getMasterConfigurationParameters(param
.getIp(), param.getDbname());
this.shellhead = (String) this.expectModule.get("shellhead");
this.shelltail = (String) this.expectModule.get("shelltail");
this.init = (String) this.expectModule.get("init");
}
COM: <s> get the necessary parameters </s>
|
funcom_train/21285406 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setFeature(String inFeature, boolean inEnable) {
try {
xmlReader.setFeature(XML_FEATURE_PREFIX + inFeature, inEnable);
}
catch(SAXException e) {
Log.INSTANCE.log(Level.WARNING, "Parser.cannotSetXmlFeature",
new Object[] { inFeature, e.getLocalizedMessage() });
}
}
COM: <s> enables or disables the given feature for this xml parser </s>
|
funcom_train/34356927 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isAsyncRIG(RIG asyncRIGCandidate) {
SSWAPResource resource = asyncRIGCandidate.getResource();
if (resource != null) {
SSWAPGraph graph = resource.getGraph();
if (graph != null) {
SSWAPSubject subject = graph.getSubject();
if ( (subject != null) && subject.getDeclaredTypes().contains(asyncRIGCandidate.getType(URI.create(Vocabulary.ASYNC_RRG.toString()))) ) {
return true;
}
}
}
return false;
}
COM: <s> verifies whether the submitted rig is an asynchronous rig </s>
|
funcom_train/25662414 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean checkTable(PokerTable pokerTable) {
if (pokerTable == null) return false;
if (pokerTable.getFlopCards().size() != 3) return false;
if (pokerTable.getNumberOfPlayers() < 2) return false;
if (pokerTable.getRiverCard() != null && pokerTable.getTurnCard() == null) return false;
return true;
}
COM: <s> method to check that a table is set correctly </s>
|
funcom_train/20399714 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void prepare() {
if (getRequest().getMethod().equalsIgnoreCase("post")) {
// prevent failures on new
String employeeId = getRequest().getParameter("employee.id");
if (employeeId != null && !employeeId.equals("")) {
employee = employeeManager.get(new Long(employeeId));
}
}
}
COM: <s> grab the entity from the database before populating with request parameters </s>
|
funcom_train/47546142 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getData (String key) {
checkDevice ();
if (key == null) error (SWT.ERROR_NULL_ARGUMENT);
if (key.equals (DISPATCH_EVENT_KEY)) {
return dispatchEvents;
}
if (keys == null) return null;
for (int i=0; i<keys.length; i++) {
if (keys [i].equals (key)) return values [i];
}
return null;
}
COM: <s> returns the application defined property of the receiver </s>
|
funcom_train/10602527 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(Item newItem) throws AccessControlException {
this.items.remove(newItem.getId());
this.items.put(newItem.getId(), newItem);
if (getLogger().isDebugEnabled()) {
getLogger().debug("Item [" + newItem + "] updated.");
}
}
COM: <s> update an item </s>
|
funcom_train/10946938 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Object invokeMethodByName(CategoryFeatureType cf, String methodName) {
java.lang.reflect.Method m = null;
try {
m = cf.getClass().getMethod(methodName);
if (m != null) {
return m.invoke(cf);
}
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
COM: <s> invoke the method specified by method name and return the corresponding return value </s>
|
funcom_train/28973324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected double getRetentionIndexForBin(HeaderFormat<String> bin,SampleObject<String> sample) throws NumberFormatException, BinBaseException{
return getFile().getAverageRetentionIndexForBin(Integer.parseInt(bin.getAttributes().get("id").toString()),sample.getValue());
}
COM: <s> returns the average retention index for a given bin for a given day </s>
|
funcom_train/12264453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addTuple(Element e, Property p) {
if(!elementSet.contains(e) || !propertySet.contains(p))
throw new IllegalArgumentException();
Set<Element> elements = propertiesMap.get(p);
if(elements == null) {
propertiesMap.put(p, new TreeSet<Element>());
elements = propertiesMap.get(p);
}
Set<Property> properties = elementsMap.get(e);
if(properties == null) {
elementsMap.put(e, new TreeSet<Property>());
properties = elementsMap.get(e);
}
return elements.add(e) && properties.add(p);
}
COM: <s> adds a tuple element property to this relation if it is not </s>
|
funcom_train/9258162 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Test
public void testNoItemsOut() throws Exception {
UhManoaLibrary uhManoa = new UhManoaLibrary();
List<ItemDue> uhInfo = uhManoa.getItemInfo (uhTestId1, lastTestName1);
assertTrue("Testing no items currently checked out.", uhInfo.isEmpty());
}
COM: <s> tests the get item info method of the uh manoa library class for </s>
|
funcom_train/36061029 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getEntriesCount( ) throws SQLException, NoDatabaseConnectionException{
Connection connection = null;
PreparedStatement statement = null;
ResultSet resultset = null;
try{
connection = application.getDatabaseConnection(DatabaseAccessType.EVENT_LOG);
statement = connection.prepareStatement("Select count(*) as EntriesCount from EventLog");
resultset = statement.executeQuery();
if( resultset.next() ){
return resultset.getInt("EntriesCount");
}
else{
return 0;
}
}
finally{
if( connection != null){
connection.close();
}
if( statement != null){
statement.close();
}
if( resultset != null){
resultset.close();
}
}
}
COM: <s> retrieves a count of the total number of log entries </s>
|
funcom_train/43325899 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean Equals( Field f ) {
if (name.equals(f.name) && set == f.set && type == f.type)
switch(type) {
case INT:
return intval == f.intval;
case STR:
return strval.equals(f.strval);
case FLOAT:
return floatval == f.floatval;
default:
return false;
}
return false;
}
COM: <s> compares a given field to itself </s>
|
funcom_train/33352990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JSlider getJSlider2() {
if (jSlider2 == null) {
jSlider2 = new JSlider();
jSlider2.setBorder(BorderFactory.createTitledBorder(null, "Color Saturation", TitledBorder.CENTER, TitledBorder.DEFAULT_POSITION, new Font("Dialog", Font.BOLD, 12), new Color(51, 51, 51)));
jSlider2.setPreferredSize(new Dimension(150, 42));
}
return jSlider2;
}
COM: <s> this method initializes j slider2 </s>
|
funcom_train/11684434 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean mediate(SynapseContext synCtx) {
log.debug(getType() + " mediate()");
if (action == ACTION_SET) {
headerType.setHeader(synCtx.getSynapseMessage(),
(getValue() != null ? getValue() :
Util.getStringValue(getExpression(), synCtx)));
} else {
headerType.removeHeader(synCtx.getSynapseMessage());
}
return true;
}
COM: <s> sets removes a soap header on the current message </s>
|
funcom_train/3904977 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetRelativeURL_Local() throws Exception {
loadContentPackage1();
Element element = cpCore.getElementByIdentifier(cpCore.getRootManifestElement(),
CP_Package1.ITEM1_ID);
String url = cpCore.getRelativeURL(element);
assertEquals("Relative URL not correct", CP_Package1.ITEM1_HREF_WITHPARAMS, url);
}
COM: <s> ensure relative url is ok with params appended </s>
|
funcom_train/18948488 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List build( List pTemplateObjects ) {
List tmlist = new ArrayList();
List tmolist = (List) Internal.null_arg( pTemplateObjects );
if( 0 < tmolist.size() ) {
if( tmolist.get(0) instanceof TemplatePath ) {
tmlist = buildTemplatePaths( tmolist );
}
else {
tmlist = buildTemplates( tmolist );
}
}
return tmlist;
}
COM: <s> build list of </s>
|
funcom_train/37839396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void KillRandomMonsters(final Player player, int numb) {
List<String> monsters = quest.enemys.get(player.getQuest(QUEST_SLOT, 1));
for(int i=0; i<numb; i++) {
if(Rand.throwCoin()==0) {
player.setSoloKill(monsters.get(Rand.rand((monsters.size()-1))));
} else {
player.setSharedKill(monsters.get(Rand.rand((monsters.size()-1))));
}
}
logger.debug("killed "+ numb + " creatures.");
}
COM: <s> function for emulating killing of quest monsters by player </s>
|
funcom_train/32354953 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void populateTree() {
progress = new BackgroundProgress(new JDialog(), "Please wait...",
"Please wait while populating the tree...");
SwingWorker<Void, Void> worker = new SwingWorker<Void, Void>() {
private RuntimeException fault;
@Override
protected Void doInBackground() throws Exception {
treeController.populateTree();
return null;
}
@Override
protected void done() {
if (fault != null) {
JOptionPane.showMessageDialog(null, fault.getMessage());
} else {
}
progress.closeDialog();
}
};
worker.execute();
progress.openDialog();
}
COM: <s> populates the tree with projects files versions </s>
|
funcom_train/6290054 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addToContentEnsurePreallocating(String content, boolean safeMode) throws Exception {
//checkSizeOfBodyPart(content.length());
ensurePrealocating();
long sizeAdded = 0;
try {
sizeAdded = addToContent(content, safeMode);
} catch (Exception exception) {
exception.printStackTrace();
throw exception;
} finally {
handleAfterAdding(sizeAdded, Functions.getStringByteSize(content));
}
}
COM: <s> do the work of adding the content to the storage </s>
|
funcom_train/43894368 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean canResolve(Class adaptee) {
if (adaptee == null) {
return false;
}
return adaptee.isAssignableFrom(Service.class)
|| adaptee.isAssignableFrom(GeoResourceInfo.class)
|| adaptee.isAssignableFrom(FeatureSource.class)
|| adaptee.isAssignableFrom(FeatureType.class) || adaptee.isAssignableFrom(DataStore.class);
}
COM: <s> supports the required geo resource resolves with an additional resolves </s>
|
funcom_train/20386008 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void handleLogging(Exception e) {
if (logCategory != null) {
if (categoryLogger == null) {
// init category logger
categoryLogger = LogFactory.getLog(logCategory);
}
doLog(categoryLogger, e);
} else {
doLog(log, e);
}
}
COM: <s> handles the logging of the exception </s>
|
funcom_train/1539067 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ExpVectorByte negate( ) {
byte[] u = val;
byte[] w = new byte[u.length];
for (int i = 0; i < u.length; i++ ) {
w[i] = (byte) ( - u[i] );
}
return new ExpVectorByte( w );
// return EVNEG(this);
}
COM: <s> exp vector negate </s>
|
funcom_train/4641577 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawPlane(String name, Point3 center, Vector3 normal) {
sunflow.parameter("center", center);
sunflow.parameter("normal", normal);
sunflow.geometry( name, "plane" );
sunflow.parameter( "shaders", currShader);
if(isModifiers) sunflow.parameter("modifiers", currModifier);
sunflow.instance( name + ".instance", name );
}
COM: <s> draw a plane </s>
|
funcom_train/3373906 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void columnRemoved(TableColumnModelEvent e) {
firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY,
null, null);
// Fire a property change event indicating the table model
// has changed.
int type = AccessibleTableModelChange.DELETE;
AccessibleJTableModelChange change =
new AccessibleJTableModelChange(type,
0,
0,
e.getFromIndex(),
e.getToIndex());
firePropertyChange(AccessibleContext.ACCESSIBLE_TABLE_MODEL_CHANGED,
null, change);
}
COM: <s> track changes to the table contents column deletions </s>
|
funcom_train/20671904 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void saveFrameToPpm(IFrame frame, String name) throws Exception {
if(frame == null)
throw new IllegalArgumentException("Frame pointer cannot be null!");
if(name == null)
throw new IllegalArgumentException("File name cannot be null!");
PPMImageFileWriter ppmFw = new PPMImageFileWriter(new File(name));
ppmFw.write(frame);
ppmFw.close();
}
COM: <s> save a frame on file system </s>
|
funcom_train/50862816 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Malfunction getClone() {
Malfunction clone = new Malfunction(name, severity, probability, emergencyWorkTime,
workTime, EVAWorkTime, scope, resourceEffects, lifeSupportEffects, medicalComplaints);
if (emergencyWorkTime > 0D)
logger.info(name + "@" + Integer.toHexString(clone.hashCode()) + " emergency starts");
return clone;
}
COM: <s> gets a clone of this malfunction </s>
|
funcom_train/22665124 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtnRegister() {
if (btnRegister == null) {
btnRegister = new JButton();
btnRegister.setBounds(new Rectangle(413, 479, 113, 50));
btnRegister.setText("Register");
btnRegister.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
register();
}
});
}
return btnRegister;
}
COM: <s> this method initializes btn register </s>
|
funcom_train/20365014 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void assertLife() {
NamedStat vitality = getPerson().getMainStats().getStat("VIT");
NamedStat willpower = getPerson().getMainStats().getStat("WIL");
assertEquals( vitality.getValue()+willpower.getValue(), getPerson().getLife().getValue() );
}
COM: <s> assert that the life label is correct for the curretn willpower and vitality </s>
|
funcom_train/18215595 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initCombineBox() {
combineBox.addItem("noCombination", "don't combine");
combineBox.addItem("add", "Add");
combineBox.addItem("subtract", "Subtract");
combineBox.addItem("multiply", "Multiply");
combineBox.addItem("divide", "Divide");
combineBox.addItem("percentage", "Percentage of");
combineBox.setSelectedIndex(0);
combineBox.setVisibleItemCount(6);
}
COM: <s> initializes the list to select the combination of two evaluations </s>
|
funcom_train/22050233 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GenericBaseData GetNextIterationIncludeDeleted(BRIterator it) {
it.Increment();
// Verify not moved off end of array
if (it.GetPos() >= m_iCurrentObjects) {
return null;
}
// Get the element from this position
GenericBaseData data = GetElement(it.GetPos());
if (data == null) {
return null;
}
return data;
}
COM: <s> this function returns the next element in the array </s>
|
funcom_train/34564139 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setPos(final int pre) {
final int off = getOff(pre);
if(off == -1) return;
final int h = getHeight() - header.getHeight() - 2 * tdata.rowH;
final int y = (off - 1) * tdata.rowH;
final int s = scroll.pos();
if(y < s || y > s + h) scroll.pos(y);
}
COM: <s> sets scrollbar position for the specified pre value </s>
|
funcom_train/25099177 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addIsMultiValuedPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_EnumerationValueType_isMultiValued_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_EnumerationValueType_isMultiValued_feature", "_UI_EnumerationValueType_type"),
DatatypesPackage.Literals.ENUMERATION_VALUE_TYPE__IS_MULTI_VALUED,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the is multi valued feature </s>
|
funcom_train/29036770 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCommand(Request request) {
if (request instanceof ReconnectRequest) {
Object view = ((ReconnectRequest) request).getConnectionEditPart()
.getModel();
if (view instanceof View) {
Integer id = new Integer(SystemVisualIDRegistry
.getVisualID((View) view));
request.getExtendedData().put(VISUAL_ID_KEY, id);
}
}
return super.getCommand(request);
}
COM: <s> extended request data key to hold editpart visual id </s>
|
funcom_train/25139104 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addToMessage(int appliId, int layerId, byte[] bytes, int length) {
if (isConnected) {
Channel channel = getChannel(appliId, layerId);
if (channel != null) {
final Protocol protocol = channel.getProtocol();
protocol.addToMessage(appliId, layerId, bytes, length);
modifiedChannels.put(channel, Boolean.TRUE);
}
}
}
COM: <s> send an arinc 661 message to the client </s>
|
funcom_train/32633761 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getName() {
if (shadow != null) {
while (shadow.shadow != null) {
shadow = shadow.shadow;
}
return shadow.getName();
}
if (name == null) {
return "local_" + (slot >= 0 ? slot + "_" : "")
+ Integer.toHexString(hashCode());
}
return name;
}
COM: <s> get the name of this local </s>
|
funcom_train/27976582 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addModifier (Modifier modifier) {
// Add modifier to list.
modifier.addListener ((Object) this);
vector.add ((Object) modifier);
// Update total value of modifiers.
Event event = new Event (this, Event.ADDED, modifier);
this.value += modifier.getValue ();
notifyListeners (event);
}
COM: <s> add a modifier to this list of modifiers </s>
|
funcom_train/49338326 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean visited() {
HiperGpxExtensionType hiperExtension = null;
for (int i = 0; i < extensions.size(); i++) {
if (extensions.get(i) instanceof HiperGpxExtensionType) {
hiperExtension = (HiperGpxExtensionType) extensions.get(i);
}
}
return hiperExtension.visited();
}
COM: <s> whether or not the site has been visited </s>
|
funcom_train/22383943 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public void setcargo(ZZCell cargo, ZZCell c) {
if(cargo.s("d.cursor-cargo", -1) == null)
cargo.N("d.cursor-cargo", -1);
setcursor(cargo.h("d.cursor-cargo", -1), c);
}
COM: <s> set the given cursor cargo to point to a cell </s>
|
funcom_train/25421243 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void handleException(Throwable t) {
if (t instanceof NotAuthorizedException) {
setNavigationOutcome("homeDirect");
extractMessageBroker().addErrorMessage(t);
} else {
extractMessageBroker().addErrorMessage(t);
getLogger().log(Level.SEVERE,"Exception raised.",t);
}
}
COM: <s> handles an exception </s>
|
funcom_train/9266427 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initRegisters() {
Processor processor = Machine.processor();
// by default, everything's 0
for (int i=0; i<processor.numUserRegisters; i++)
processor.writeRegister(i, 0);
// initialize PC and SP according
processor.writeRegister(Processor.regPC, initialPC);
processor.writeRegister(Processor.regSP, initialSP);
// initialize the first two argument registers to argc and argv
processor.writeRegister(Processor.regA0, argc);
processor.writeRegister(Processor.regA1, argv);
}
COM: <s> initialize the processors registers in preparation for running the </s>
|
funcom_train/10209873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onModelCleared() {
exportToSumoAction.setEnabled(false);
elementAddedObserver = new Observer() {
@Override
public void update(Observable o, Object arg) {
ObserverNotification notification = (ObserverNotification) arg;
if( notification.getType() == NotificationType.elementAdded ) {
onModelElementAdded((ModelElement) notification.getObj1());
}
}
};
ModelManager.getInstance().addObserver(elementAddedObserver);
}
COM: <s> is called when the model is cleared </s>
|
funcom_train/20286658 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AssignmentProjectAllocation getProjectMap(int id) {
Integer projectId = new Integer(id);
AssignmentProjectAllocation projectMap = (AssignmentProjectAllocation) this.get(projectId);
if (projectMap == null) {
projectMap = new AssignmentProjectAllocation();
this.put(projectId, projectMap);
}
projectMap.setUserAllocation(this);
return projectMap;
}
COM: <s> gets the project map attribute of the assignment user allocation object </s>
|
funcom_train/27825807 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PropertyValueTracker getPropertiesFromTracker() {
if (m_propertiesFrom==null)
m_propertiesFrom=new PropertyValueTracker() {
protected Map loadMap() throws KAONException {
return getVirtualPropertyValues(getInstance().getFromPropertyValues(),true);
}
};
return m_propertiesFrom;
}
COM: <s> returns a property value tracker for properties from this instance </s>
|
funcom_train/14156841 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean stopStreaming(int id) {
if (!isValidID(id)) {
//callback.daemonRcvError("Daemon : Invalid ID in stop streaming request !");
Logs.errorMsg("Daemon: Invalid ID in stop streaming request !");
return false;
}
else
return sendQuery(DaemonProtocol.STOP_STREAMING, DaemonProtocol.SEP + id);
}
COM: <s> stop a specific streamer given its internal id which was </s>
|
funcom_train/884892 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTargetInstance(Instance instance) {
super.setTargetInstance(instance);
contentPanel = new JPanel();
contentPanel.setLayout(new GridBagLayout());
if (instance != null) {
Iterator<Link> incomingReferenceLinks = instance.getIncomingLinks();
while (incomingReferenceLinks.hasNext()) {
Link l = incomingReferenceLinks.next();
if (l.getBinding() instanceof ReferenceBinding) {
addRefsForLink(l, instance);
}
}
}
enclosingPanel.setContent(contentPanel);
}
COM: <s> sets the target whose incoming refrences will be displayed </s>
|
funcom_train/11011007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setColumnWidth(int columnIndex, int width) {
if(width > 255*256) throw new IllegalArgumentException("The maximum column width for an individual cell is 255 characters.");
columnHelper.setColWidth(columnIndex, (double)width/256);
columnHelper.setCustomWidth(columnIndex, true);
}
COM: <s> set the width in units of 1 256th of a character width </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.