Convenience method for below.
196117
static TaskInstance createTaskInstance(Long taskId, String masterRequestId, Long procInstId,
            String secOwner, Long secOwnerId, String title, String comments) throws ServiceException, DataAccessException {
        return createTaskInstance(taskId, masterRequestId, procInstId, secOwner, secOwnerId, title, comments, 0, null, null);
    }
214169
public void simplify() throws ParseException {
    if (!simplified) {
      simplified = true;
      boolean optionalParts = true;
      List<MtasCQLParserBasicSentencePartCondition> newPartList;
      MtasCQLParserBasicSentencePartCondition lastPart = null;
      newPartList = new ArrayList<MtasCQLParserBasicSentencePartCondition>();
      // try and merge equal basicSentencePart (word/group) conditions
      for (MtasCQLParserBasicSentencePartCondition part : partList) {
        if ((lastPart == null) || !lastPart.equals(part)) {
          lastPart = part;
          newPartList.add(part);
          if (!part.isOptional()) {
            optionalParts = false;
          }
        } else {
          int newMinimumOccurence;
          int newMaximumOccurence;
          if (!lastPart.isOptional() && !part.isOptional()) {
            newMinimumOccurence = lastPart.getMinimumOccurence()
                + part.getMinimumOccurence();
            newMaximumOccurence = lastPart.getMaximumOccurence()
                + part.getMaximumOccurence();
            lastPart.setOccurence(newMinimumOccurence, newMaximumOccurence);
          } else if (!lastPart.isOptional() && part.isOptional()) {
            if (part.getMinimumOccurence() == 1) {
              newMinimumOccurence = lastPart.getMinimumOccurence()
                  + part.getMinimumOccurence() - 1;
              newMaximumOccurence = lastPart.getMaximumOccurence()
                  + part.getMaximumOccurence();
              lastPart.setOccurence(newMinimumOccurence, newMaximumOccurence);
            } else {
              lastPart = part;
              newPartList.add(part);
              if (!part.isOptional()) {
                optionalParts = false;
              }
            }
          } else if (lastPart.isOptional() && !part.isOptional()) {
            if (lastPart.getMinimumOccurence() == 1) {
              newMinimumOccurence = lastPart.getMinimumOccurence()
                  + part.getMinimumOccurence() - 1;
              newMaximumOccurence = lastPart.getMaximumOccurence()
                  + part.getMaximumOccurence();
              lastPart.setOccurence(newMinimumOccurence, newMaximumOccurence);
              lastPart.setOptional(false);
              optionalParts = false;
            } else {
              lastPart = part;
              newPartList.add(part);
              optionalParts = false;
            }
          } else {
            if ((lastPart.getMinimumOccurence() == 1)
                && (part.getMinimumOccurence() == 1)) {
              newMinimumOccurence = 1;
              newMaximumOccurence = lastPart.getMaximumOccurence()
                  + part.getMaximumOccurence();
              lastPart.setOccurence(newMinimumOccurence, newMaximumOccurence);
              lastPart.setOptional(true);
            } else {
              lastPart = part;
              newPartList.add(part);
            }
          }
        }
      }
      partList = newPartList;
      if (optionalParts) {
        optional = true;
      }
    }
  }
243231
def prepare(self):
		""""""
		self.scope = 0
		self.mapping = deque([0])
		self._handler = [i() for i in sorted(self.handlers, key=lambda handler: handler.priority)]
978767
public void simplify()
  {
    // remove all addresses from the cc and bcc that are in the to address set.
    ccSet.removeAll(toSet);
    bccSet.removeAll(toSet);

    // remove all address from the bcc set that are in the cc set.
    bccSet.removeAll(ccSet);
  }
1220971
def gotoPrevious(self):
        
        index = self._currentPanel.currentIndex() - 1
        if index < 0:
            index = self._currentPanel.count() - 1
        
        self._currentPanel.setCurrentIndex(index)
1126416
def columns(self):
        """"""
        res = [col['name'] for col in self.column_definitions]
        res.extend([col['name'] for col in self.foreign_key_definitions])
        return res
921083
protected void maybeLoadMethods ()
    {
        if (_methodMap == null) {
            _methodMap = new HashMap<String,List<Member>>();
            Method[] methods = _clazz.getMethods();

            for (int i = 0; i < methods.length; ++i) {
                Method m = methods[i];
                String methodName = m.getName();
                Class<?>[] paramTypes = m.getParameterTypes();

                List<Member> list = _methodMap.get(methodName);
                if (list == null) {
                    list = new ArrayList<Member>();
                    _methodMap.put(methodName, list);
                }

                if (!ClassUtil.classIsAccessible(_clazz)) {
                    m = ClassUtil.getAccessibleMethodFrom(_clazz, methodName, paramTypes );
                }

                if (m != null) {
                    list.add(m);
                    _paramMap.put(m, paramTypes);
                }
            }
        }
    }
24678
def setup(self):
        """"""
        if len(self.plugins_tabs) == 0:
            self.close()
            return

        self.list.clear()
        current_path = self.current_path
        filter_text = self.filter_text

        # Get optional line or symbol to define mode and method handler
        trying_for_symbol = ('@' in self.filter_text)

        if trying_for_symbol:
            self.mode = self.SYMBOL_MODE
            self.setup_symbol_list(filter_text, current_path)
        else:
            self.mode = self.FILE_MODE
            self.setup_file_list(filter_text, current_path)

        # Set position according to size
        self.set_dialog_position()
1271085
def done(self):
        """"""
        return [mm.name for mm in self.model.select().order_by(self.model.id)]
79691
def do(self):
        ""
        _PR = urlparse(self.url)
        return _PR.scheme, _PR.netloc, _PR.path, _PR.params, _PR.query, _PR.fragment
662508
public void printUsage()
    {
        System.out.printf("Usage: %s --help\n   or: %s ", this.Name, this.Name);
        for(Argument a : Arguments)
        {
            if(a.Optional)
                System.out.printf("[--%s=%s]\n           ", a.Name, (a.DisplayValue == null ? "value" : a.DisplayValue));
            else
                System.out.printf("--%s=%s\n           ", a.Name, (a.DisplayValue == null ? "value" : a.DisplayValue));
        }
        for(Argument a : Arguments)
        {
            if(a.Optional)
                System.out.printf("\n[--%s=%s]\n", a.Name, (a.DisplayValue == null ? "value" : a.DisplayValue));
            else
                System.out.printf("\n--%s=%s\n", a.Name, (a.DisplayValue == null ? "value" : a.DisplayValue));
            System.out.printf("  %s\n", a.Description);
            if(a.Optional)
                System.out.printf("  Default: %s\n", a.DefaultValue);
        }
    }
1247400
function () {
        var data = this.data;
        var nodes = this._nodes;

        for (var i = 0, len = nodes.length; i < len; i++) {
            nodes[i].dataIndex = -1;
        }

        for (var i = 0, len = data.count(); i < len; i++) {
            nodes[data.getRawIndex(i)].dataIndex = i;
        }
    }
1168890
public void setHeading(String heading)
    {
	    
    	String m_heading = heading;
	    
    	String [] preCol = m_heading.split("\n");
    	String [][] cells = new String[preCol.length][this.m_columnNumber];
    	
    	
    	for(int i=0; i<preCol.length; i++)
    		cells[i] = preCol[i].split(";", this.m_columnNumber);
    	
    	for(int i=0; i<cells[0].length; i++)
    	{
    		String xhead = "";
    		for(int j=0; j<preCol.length; j++){
    			//if(cells[j][i]!=null)
    			xhead += (cells[j][i]+ " ");
    		}
    		this.m_xheading.add(xhead);
    	}
    	
    }
1207136
def shorthand(self):
        """"""
        return (self.a, self.b, self.c, self.d, self.e, self.f)
1170718
void doInfo(){
		this.infos.add("scanned directories:    " + this.scDir);
		this.infos.add("unreadable directories: " + this.scDirUnreadable);

		this.infos.add("found files:      " + this.scFiles);
		this.infos.add("unreadable files: " + this.scFilesUnreadable);
	}
1135058
def prepend(self, _, child, name=None):
        """"""
        self._insert(child, prepend=True, name=name)
        return self
164618
def simplify(self):
        """"""
        d = defaultdict(float)
        for term in self.terms:
            term = term.simplify()
            d[term.ops] += term.coeff
        return Expr.from_terms_iter(
            Term.from_ops_iter(k, d[k]) for k in sorted(d, key=repr) if d[k])