rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
final String message = REZ.getString( "connect.error", hostname ); throw new FileSystemException( message, exc ); | throw new FileSystemException( "vfs.provider.ftp/connect.error", new Object[]{hostname}, exc ); | public FtpFileSystem( final FileName rootName, final String hostname, final String username, final String password ) throws FileSystemException { super( rootName, null ); try { client = new FTPClient... |
final String message = REZ.getString( "close-connection.error" ); getLogger().warn( message, e ); | getLogger().warn( "vfs.provider.ftp/close-connection.error", e ); | private void closeConnection() { try { // Clean up if ( client.isConnected() ) { client.disconnect(); } } catch ( final IOException e ) { final String message = REZ.getString( "close-connection.error" ); ... |
Properties ret = resolver.getServiceProperties(); | Properties ret = resolver.getServiceProperties("myBean"); | public void testGetServiceProperties() { MockControl bundleContextControl = MockControl.createControl(BundleContext.class); BundleContext mockContext = (BundleContext) bundleContextControl.getMock(); MockControl bundleControl = MockControl.createControl(Bundle.class); Bundle mockBundle = (Bundle) bundleControl.get... |
assertEquals("2 properties",2,ret.size()); | assertEquals("3 properties",3,ret.size()); | public void testGetServiceProperties() { MockControl bundleContextControl = MockControl.createControl(BundleContext.class); BundleContext mockContext = (BundleContext) bundleContextControl.getMock(); MockControl bundleControl = MockControl.createControl(Bundle.class); Bundle mockBundle = (Bundle) bundleControl.get... |
assertEquals("myBean",ret.get("org.springframework.osgi.beanname")); | public void testGetServiceProperties() { MockControl bundleContextControl = MockControl.createControl(BundleContext.class); BundleContext mockContext = (BundleContext) bundleContextControl.getMock(); MockControl bundleControl = MockControl.createControl(Bundle.class); Bundle mockBundle = (Bundle) bundleControl.get... | |
public static final int getType(String desc) | public int getType() | public static final int getType(String desc) { int i; for (i=1;i<value_type_desc.length;i++) { if (value_type_desc[i].equalsIgnoreCase(desc)) { return i; } } return VALUE_TYPE_NONE; } |
int i; for (i=1;i<value_type_desc.length;i++) { if (value_type_desc[i].equalsIgnoreCase(desc)) { return i; } } return VALUE_TYPE_NONE; | if (value==null) return VALUE_TYPE_NONE; return value.getType(); | public static final int getType(String desc) { int i; for (i=1;i<value_type_desc.length;i++) { if (value_type_desc[i].equalsIgnoreCase(desc)) { return i; } } return VALUE_TYPE_NONE; } |
public static BufferedImage makeImage(byte[] data, int w, int h, int c, boolean interleaved) | public static BufferedImage makeImage(byte[] data, int w, int h, int c, boolean interleaved, int bps, boolean little) | public static BufferedImage makeImage(byte[] data, int w, int h, int c, boolean interleaved) { return makeImage(data, w, h, c, interleaved, null); } |
return makeImage(data, w, h, c, interleaved, null); | return makeImage(data, w, h, c, interleaved, bps, little, null); | public static BufferedImage makeImage(byte[] data, int w, int h, int c, boolean interleaved) { return makeImage(data, w, h, c, interleaved, null); } |
super(namespaceURI, localPart, lookupPrefix(namespaceURI)); | this.namespaceURI = namespaceURI; this.localPart = localPart; | public QName(String namespaceURI, String localPart) { super(namespaceURI, localPart, lookupPrefix(namespaceURI)); } |
try { return new JAXWSType(type); } catch (IllegalJAXWSTypeException e) { throw new RuntimeException(e); } | return new JAXWSType(type); | public Type createType(Method m, int index) { java.lang.reflect.Type type = index < 0 ? m.getGenericReturnType() : m.getGenericParameterTypes()[index]; try { return new JAXWSType(type); } catch (IllegalJAXWSTypeException e) { throw new RuntimeException(e); } } |
if (parameterNames == null) { throw new IllegalArgumentException("Unknown web message " + methodName); } | if (parameterNames != null) { try { name = parameterNames[parameterIndex]; } catch (IndexOutOfBoundsException e) { throw new IllegalArgumentException("Unknown parameter for method " + methodName + ": " + parameterIndex); } | public QName getElementName(Method method, int parameterIndex) { String name = "arg" + parameterIndex; Class endpointInterface = method.getDeclaringClass(); String namespace = calculateNamespaceURI(endpointInterface); //let the @WebService annotation customize the target namespace. WebService wsInfo = ... |
try { name = parameterNames[parameterIndex]; } catch (IndexOutOfBoundsException e) { throw new IllegalArgumentException("Unknown parameter for method " + methodName + ": " + parameterIndex); } | Annotation[] annotations = method.getParameterAnnotations()[parameterIndex]; for (Annotation annotation : annotations) { if (annotation instanceof WebParam) { WebParam webParam = (WebParam) annotation; if ((webParam.partName() != null) && (!"".equals(webParam.partName()))) { name = webParam.partName(); } else if ((webP... | public QName getElementName(Method method, int parameterIndex) { String name = "arg" + parameterIndex; Class endpointInterface = method.getDeclaringClass(); String namespace = calculateNamespaceURI(endpointInterface); //let the @WebService annotation customize the target namespace. WebService wsInfo = ... |
Annotation[] annotations = method.getParameterAnnotations()[parameterIndex]; for (Annotation annotation : annotations) { if (annotation instanceof WebParam) { WebParam webParam = (WebParam) annotation; if ((webParam.partName() != null) && (!"".equals(webParam.partName()))) { name = webParam.partName(); } else if ((webP... | if ((webParam.targetNamespace() != null) && (!"".equals(webParam.targetNamespace()))) { namespace = webParam.targetNamespace(); } | public QName getElementName(Method method, int parameterIndex) { String name = "arg" + parameterIndex; Class endpointInterface = method.getDeclaringClass(); String namespace = calculateNamespaceURI(endpointInterface); //let the @WebService annotation customize the target namespace. WebService wsInfo = ... |
public JAXWSType(Type type) throws IllegalJAXWSTypeException { setWriteOuter(false); | public JAXWSType(Type type) { | public JAXWSType(Type type) throws IllegalJAXWSTypeException { setWriteOuter(false); if (type instanceof Class) { Class clazz = (Class) type; setTypeClass(clazz); this.delegate = new JaxbTypeInternal(clazz); } else if (type instanceof ParameterizedType) { ParameterizedType parameterize... |
this.delegate = new JaxbTypeInternal(clazz); | if (clazz.isArray()) { this.delegate = new JAXWSType(clazz.getComponentType()); this.collection = true; } else { this.delegate = null; } | public JAXWSType(Type type) throws IllegalJAXWSTypeException { setWriteOuter(false); if (type instanceof Class) { Class clazz = (Class) type; setTypeClass(clazz); this.delegate = new JaxbTypeInternal(clazz); } else if (type instanceof ParameterizedType) { ParameterizedType parameterize... |
throw new IllegalJAXWSTypeException(); | throw new XFireRuntimeException("Illegal JAXWS type: " + rawType); | public JAXWSType(Type type) throws IllegalJAXWSTypeException { setWriteOuter(false); if (type instanceof Class) { Class clazz = (Class) type; setTypeClass(clazz); this.delegate = new JaxbTypeInternal(clazz); } else if (type instanceof ParameterizedType) { ParameterizedType parameterize... |
throw new IllegalJAXWSTypeException(); | throw new XFireRuntimeException("Enunciate doesn't yet support maps."); | public JAXWSType(Type type) throws IllegalJAXWSTypeException { setWriteOuter(false); if (type instanceof Class) { Class clazz = (Class) type; setTypeClass(clazz); this.delegate = new JaxbTypeInternal(clazz); } else if (type instanceof ParameterizedType) { ParameterizedType parameterize... |
Class holderClass = stripFirstTypeArg(parameterizedType); this.delegate = new HolderType(new JaxbTypeInternal(holderClass)); | this.delegate = new HolderType(new JAXWSType(stripFirstTypeArg(parameterizedType))); | public JAXWSType(Type type) throws IllegalJAXWSTypeException { setWriteOuter(false); if (type instanceof Class) { Class clazz = (Class) type; setTypeClass(clazz); this.delegate = new JaxbTypeInternal(clazz); } else if (type instanceof ParameterizedType) { ParameterizedType parameterize... |
Class itemClass = stripFirstTypeArg(parameterizedType); this.delegate = new JaxbTypeInternal(itemClass); | this.delegate = new JAXWSType(stripFirstTypeArg(parameterizedType)); this.collection = true; | public JAXWSType(Type type) throws IllegalJAXWSTypeException { setWriteOuter(false); if (type instanceof Class) { Class clazz = (Class) type; setTypeClass(clazz); this.delegate = new JaxbTypeInternal(clazz); } else if (type instanceof ParameterizedType) { ParameterizedType parameterize... |
this.delegate = new JaxbTypeInternal(rawClass.getComponentType()); | this.delegate = new JAXWSType(rawClass.getComponentType()); this.collection = true; | public JAXWSType(Type type) throws IllegalJAXWSTypeException { setWriteOuter(false); if (type instanceof Class) { Class clazz = (Class) type; setTypeClass(clazz); this.delegate = new JaxbTypeInternal(clazz); } else if (type instanceof ParameterizedType) { ParameterizedType parameterize... |
this.delegate = new JaxbTypeInternal(rawClass); | this.delegate = null; } } else if (type instanceof GenericArrayType) { this.delegate = new JAXWSType(((GenericArrayType) type).getGenericComponentType()); this.collection = true; } else if (type instanceof TypeVariable) { Type[] bounds = ((TypeVariable) type).getBounds(); if ((bounds == null) || (bounds.length == 0)) {... | public JAXWSType(Type type) throws IllegalJAXWSTypeException { setWriteOuter(false); if (type instanceof Class) { Class clazz = (Class) type; setTypeClass(clazz); this.delegate = new JaxbTypeInternal(clazz); } else if (type instanceof ParameterizedType) { ParameterizedType parameterize... |
throw new IllegalJAXWSTypeException(); | throw new XFireRuntimeException("Unknown JAXWS type: " + type); | public JAXWSType(Type type) throws IllegalJAXWSTypeException { setWriteOuter(false); if (type instanceof Class) { Class clazz = (Class) type; setTypeClass(clazz); this.delegate = new JaxbTypeInternal(clazz); } else if (type instanceof ParameterizedType) { ParameterizedType parameterize... |
final List expected = new LinkedList( Arrays.asList( Echo.class, DuplicateEcho.class ) ); final List actual = new LinkedList( Arrays.asList( echo.getClass().getInterfaces() ) ); | final List<Class> expected = new LinkedList<Class>( Arrays.asList( Echo.class, DuplicateEcho.class ) ); final List<Class> actual = new LinkedList<Class>( Arrays.asList( echo.getClass().getInterfaces() ) ); | public void testDelegatingProxyInterfaceOrder() { final Echo echo = ( Echo ) factory.createDelegatingProxy( singletonProvider( beanProvider( EchoImpl.class ) ), Echo.class, DuplicateEcho.class ); final List expected = new LinkedList( Arrays.asList( Echo.class, DuplicateEcho.class ) ); final ... |
public SimpleGFFRecord() { this.seqName = null; this.source = null; this.feature = null; this.start = 0; this.end = 0; this.score = 0; this.strand = null; this.frame = 0; this.comment = null; this.groupAttributes = null; | public SimpleGFFRecord(GFFRecord rec) { this.seqName = rec.getSeqName(); this.source = rec.getSource(); this.feature = rec.getFeature(); this.start = rec.getStart(); this.end = rec.getEnd(); this.score = rec.getScore(); this.strand = rec.getStrand(); this.frame = rec.getFrame(); this.comment = rec.getComment(); this.gr... | public SimpleGFFRecord() { this.seqName = null; this.source = null; this.feature = null; this.start = 0; this.end = 0; this.score = 0; this.strand = null; this.frame = 0; this.comment = null; this.groupAttributes = null; } |
public Value(String name, int val_type) | public Value() | public Value(String name, int val_type) { clearValue(); newValue(val_type); setName(name); } |
newValue(val_type); setName(name); | public Value(String name, int val_type) { clearValue(); newValue(val_type); setName(name); } | |
public void setValue(String str) { if (value==null || value.getType()!=VALUE_TYPE_STRING) value = new ValueString(str); else value.setString(str); setNull(str==null); } | public void setValue(BigDecimal num) { if (value==null || value.getType()!=VALUE_TYPE_BIGNUMBER) value = new ValueBigNumber(num); else value.setBigNumber(num); setNull(false); } | public void setValue(String str) { if (value==null || value.getType()!=VALUE_TYPE_STRING) value = new ValueString(str); else value.setString(str); setNull(str==null); } |
return addTagValue(tag, val, true); | StringBuffer value; if (val!=null) { value = new StringBuffer(val); Const.repl(value, "&", "&"); Const.repl(value, "'", "'"); Const.repl(value, "<", "<"); Const.repl(value, ">", ">"); Const.repl(value, "\"", """); } else { value = new StringBuffer(); } return "<"+tag+">"+value+"</"+tag+">"+(cr?Con... | public static final String addTagValue(String tag, String val) { return addTagValue(tag, val, true); } |
public long saveStepAttribute(long id_transformation, long id_step, long nr, String code, String value) | public long saveStepAttribute(long id_transformation, long id_step, String code, String value) | public long saveStepAttribute(long id_transformation, long id_step, long nr, String code, String value) throws KettleDatabaseException { if (value==null || value.length()==0) return -1L; return saveStepAttribute(code, nr, id_transformation, id_step, 0.0, value); } |
if (value==null || value.length()==0) return -1L; return saveStepAttribute(code, nr, id_transformation, id_step, 0.0, value); | return saveStepAttribute(code, 0, id_transformation, id_step, 0.0, value); | public long saveStepAttribute(long id_transformation, long id_step, long nr, String code, String value) throws KettleDatabaseException { if (value==null || value.length()==0) return -1L; return saveStepAttribute(code, nr, id_transformation, id_step, 0.0, value); } |
public BioError(Throwable ex, String message) { this(message, ex); | public BioError(String message) { super(message); | public BioError(Throwable ex, String message) { this(message, ex); } |
public UnsupportedChromatogramFormatException(String message) { super(message); | public UnsupportedChromatogramFormatException() { super(); | public UnsupportedChromatogramFormatException(String message) { super(message); } |
public SmallMap(int size) { super(); mappings = new Object[size * 2]; | public SmallMap() { this(5); | public SmallMap(int size) { super(); mappings = new Object[size * 2]; } |
boolean recurse = FilterUtils.areProperSubset(filter, FeatureFilter.top_level); | boolean recurse = !FilterUtils.areProperSubset(filter, FeatureFilter.top_level); | public FeatureHolder filter(FeatureFilter filter) { boolean recurse = FilterUtils.areProperSubset(filter, FeatureFilter.top_level); return filter(filter, recurse); } |
public ValueChanger(TagValueListener delegate, ChangeTable changeTable) { | public ValueChanger(TagValueListener delegate) { | public ValueChanger(TagValueListener delegate, ChangeTable changeTable) { super(delegate); this.changeTable = changeTable; } |
this.changeTable = changeTable; | public ValueChanger(TagValueListener delegate, ChangeTable changeTable) { super(delegate); this.changeTable = changeTable; } | |
public TagDelegator(TagValueListener delegate) { super(delegate); parsers = new SmallMap(); listeners = new SmallMap(); | public TagDelegator() { super(); | public TagDelegator(TagValueListener delegate) { super(delegate); parsers = new SmallMap(); listeners = new SmallMap(); } |
public TransMeta(String filename, String name, String arguments[]) | public TransMeta() | public TransMeta(String filename, String name, String arguments[]) { clear(); this.filename = filename; this.name = name; this.arguments = arguments; } |
this.filename = filename; this.name = name; this.arguments = arguments; | public TransMeta(String filename, String name, String arguments[]) { clear(); this.filename = filename; this.name = name; this.arguments = arguments; } | |
public SimplePosition(boolean fs, boolean fe, int s, int e, String t) { this.fs = fs; this.fe = fe; this.s = s; this.e = e; this.t = t; | public SimplePosition(boolean fs, boolean fe, int p) { this(fs,fe,p,p,null); | public SimplePosition(boolean fs, boolean fe, int s, int e, String t) { this.fs = fs; this.fe = fe; this.s = s; this.e = e; this.t = t; } |
public RepositoriesDialog(Display disp, int style, int perm[], String toolName) { display = disp; toolsPermissions = perm; steploader = StepLoader.getInstance(); this.toolName = toolName; shell = new Shell(disp, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MAX | SWT.MIN ); shell.setText("Kettle repositories"); log=LogWriter.ge... | public RepositoriesDialog(Display disp, int style, LogWriter l, Props pr, int perm[], String toolName) { this(disp, style, perm, toolName); } | public RepositoriesDialog(Display disp, int style, int perm[], String toolName) { display = disp; toolsPermissions = perm; steploader = StepLoader.getInstance(); this.toolName = toolName; shell = new Shell(disp, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MAX | SWT.MIN ); shell.setText("Kettle repositories"); log=LogW... |
public StepMeta(LogWriter log, String stepid, String stepname, StepMetaInterface stepMetaInterface) | public StepMeta(String stepid, String stepname, StepMetaInterface stepMetaInterface) | public StepMeta(LogWriter log, String stepid, String stepname, StepMetaInterface stepMetaInterface) { this(stepid, stepname, stepMetaInterface); } |
this(stepid, stepname, stepMetaInterface); | this(stepname, stepMetaInterface); if (this.stepid==null) this.stepid = stepid; | public StepMeta(LogWriter log, String stepid, String stepname, StepMetaInterface stepMetaInterface) { this(stepid, stepname, stepMetaInterface); } |
public static final LogWriter getInstance(String filename, boolean exact, int level) | public static final LogWriter getInstance() | public static final LogWriter getInstance(String filename, boolean exact, int level) { LogWriter log = findLogWriter(filename); if (log != null) return log; lastLog = new LogWriter(filename, exact, level); logs.put(filename, lastLog); return lastLog; } |
LogWriter log = findLogWriter(filename); | if (lastLog!=null) return lastLog; | public static final LogWriter getInstance(String filename, boolean exact, int level) { LogWriter log = findLogWriter(filename); if (log != null) return log; lastLog = new LogWriter(filename, exact, level); logs.put(filename, lastLog); return lastLog; } |
if (log != null) return log; lastLog = new LogWriter(filename, exact, level); logs.put(filename, lastLog); return lastLog; | throw new RuntimeException("The logging system is not initialized!"); | public static final LogWriter getInstance(String filename, boolean exact, int level) { LogWriter log = findLogWriter(filename); if (log != null) return log; lastLog = new LogWriter(filename, exact, level); logs.put(filename, lastLog); return lastLog; } |
public UserInfo(Repository rep, String login, String passwd) throws KettleException | public UserInfo(String login, String password, String name, String description, boolean enabled, ProfileMeta profile) | public UserInfo(Repository rep, String login, String passwd) throws KettleException { this(rep, login); // Verify the password: if ( getID()<0 || !passwd.equals(getPassword()) ) { throw new KettleException("Incorrect password or login!"); } } |
this(rep, login); if ( getID()<0 || !passwd.equals(getPassword()) ) { throw new KettleException("Incorrect password or login!"); } | this.login = login; this.password = password; this.name = name; this.description = description; this.enabled = enabled; this.profile = profile; | public UserInfo(Repository rep, String login, String passwd) throws KettleException { this(rep, login); // Verify the password: if ( getID()<0 || !passwd.equals(getPassword()) ) { throw new KettleException("Incorrect password or login!"); } } |
public static final int indexOfString(String lookup, ArrayList array) | public static final int indexOfString(String lookup, String array[]) | public static final int indexOfString(String lookup, ArrayList array) { if (array==null) return -1; for (int i=0;i<array.size();i++) { String compare = (String)array.get(i); if (lookup.equalsIgnoreCase(compare)) return i; } return -1; } |
if (array==null) return -1; for (int i=0;i<array.size();i++) | if (array == null) return -1; if (lookup == null) return -1; for (int i = 0; i < array.length; i++) | public static final int indexOfString(String lookup, ArrayList array) { if (array==null) return -1; for (int i=0;i<array.size();i++) { String compare = (String)array.get(i); if (lookup.equalsIgnoreCase(compare)) return i; } return -1; } |
String compare = (String)array.get(i); if (lookup.equalsIgnoreCase(compare)) return i; | if (lookup.equalsIgnoreCase(array[i])) return i; | public static final int indexOfString(String lookup, ArrayList array) { if (array==null) return -1; for (int i=0;i<array.size();i++) { String compare = (String)array.get(i); if (lookup.equalsIgnoreCase(compare)) return i; } return -1; } |
public AppendTemplate(Display display, TextBox target) { | public AppendTemplate(Display display, MessageEdit target, int caretPos) { | public AppendTemplate(Display display, TextBox target) { super (display); this.target=target; if (target!=null) { addCommand(cmdSelect); } addCommand(cmdNew); addCommand(cmdDelete); addCommand(cmdBack); try { focusedItem(0); } catch (Exception e) {} setCommandListener(this); Title tit... |
this.caretPos=caretPos; | public AppendTemplate(Display display, TextBox target) { super (display); this.target=target; if (target!=null) { addCommand(cmdSelect); } addCommand(cmdNew); addCommand(cmdDelete); addCommand(cmdBack); try { focusedItem(0); } catch (Exception e) {} setCommandListener(this); Title tit... | |
try { int paste=target.getMaxSize()-target.size(); if (paste>data.length()) paste=data.length(); target.insert(data.substring(0,paste), target.size()); } catch (Exception e) { e.printStackTrace(); } | target.insertText(data, caretPos); | private void pasteData() { if (target==null) return; Msg m=getMessage(cursor); if (m==null) return; String data; data=m.getBody(); try { int paste=target.getMaxSize()-target.size(); if (paste>data.length()) paste=data.length(); target.insert(data.substring(0,paste), target.size()); } catch (Exception e)... |
todo: read the config file into the prefixMap and schemaMap todo: but don't overwrite the constant namespaces | todo: read the config file for type declarations that aren't in the source base to preload as xml type definitions todo: read the config file into the prefixMap and schemaMap (but don't overwrite the constant namespaces!) todo: read the config file for element/attribute form default | protected FreemarkerModel getRootModel() { EnunciateFreemarkerModel model = (EnunciateFreemarkerModel) super.getRootModel(); model.put("prefix", new PrefixMethod()); model.put("qname", new QNameMethod()); AnnotationProcessorEnvironment env = Context.getCurrentEnvironment(); Collection<TypeDeclaration> ... |
return false; } if (declaration.getAnnotation(XmlTransient.class) != null) { | protected boolean isPotentialSchemaType(TypeDeclaration declaration) { if (!(declaration instanceof ClassDeclaration)) { return false; } Collection<AnnotationMirror> annotationMirrors = declaration.getAnnotationMirrors(); for (AnnotationMirror mirror : annotationMirrors) { AnnotationTypeDeclarat... | |
setVariable("knownNamespaces", new ArrayList<String>(this.namespacesToPrefixes.keySet())); | public EnunciateFreemarkerModel() { this.namespacesToPrefixes = loadKnownNamespaces(); this.knownTypes = loadKnownTypes(); this.namespacesToSchemas = new HashMap<String, SchemaInfo>(); this.namespacesToWsdls = new HashMap<String, WsdlInfo>(); setVariable("ns2prefix", this.namespacesToPrefixes); setV... | |
public static void writeKeyValueLine(String key, String text, int keyWidth, int lineWidth, String sep, String wrappedKey, PrintStream os) { if (key==null || text==null) return; if (wrappedKey==null) wrappedKey=""; if (sep==null) sep="\\s+"; text = text.trim(); String[] lines = StringTools.wordWrap(text, sep, lineWidth-... | public static void writeKeyValueLine(String key, String text, int keyWidth, int lineWidth, PrintStream os) { writeKeyValueLine(key,text,keyWidth,lineWidth,null,null,os); | public static void writeKeyValueLine(String key, String text, int keyWidth, int lineWidth, String sep, String wrappedKey, PrintStream os) { if (key==null || text==null) return; // skip blank lines if (wrappedKey==null) wrappedKey=""; // stop null pointer exceptions on wrapped keys if (sep==null... |
public Value divide(long v) throws KettleValueException { return divide(new Value("tmp", v)); } | public Value divide(BigDecimal v) throws KettleValueException { return divide(new Value("tmp", v)); } | public Value divide(long v) throws KettleValueException { return divide(new Value("tmp", v)); } |
public Value str2num(String pattern, String decimal, String grouping, String currency) throws KettleValueException { if (isNull()) { setType(VALUE_TYPE_STRING); } else { if (getType()==VALUE_TYPE_STRING) { if (getString()==null) { setNull(); setValue(0.0); } else { NumberFormat nf = NumberFormat.getInstan... | public Value str2num() throws KettleValueException { return str2num(null, null, null, null); } | public Value str2num(String pattern, String decimal, String grouping, String currency) throws KettleValueException { // 0 : pattern // 1 : Decimal separator // 2 : Grouping separator // 3 : Currency symbol if (isNull()) { setType(VALUE_TYPE_STRING); } else { if (getType()==VALUE_TYPE_STRING) { if (ge... |
public void println(int lvl, String subject, String msg) | public void println(int lvl, String msg) | public void println(int lvl, String subject, String msg) { // Are the message filtered? if (filter!=null && filter.length()>0) { if (subject.indexOf(filter)<0 && msg.indexOf(filter)<0) { return; // "filter" not found in row: don't show! } } if (lev... |
if (filter!=null && filter.length()>0) { if (subject.indexOf(filter)<0 && msg.indexOf(filter)<0) { return; } } if (level==0) return; if (level<lvl) return; Logger logger = Logger.getLogger(subject); Log4jMessage message = new Log4jMessage(msg, subject); switch(level) { case LOG_LEVEL_ERROR: logger.error(message)... | println(lvl, "General", msg); | public void println(int lvl, String subject, String msg) { // Are the message filtered? if (filter!=null && filter.length()>0) { if (subject.indexOf(filter)<0 && msg.indexOf(filter)<0) { return; // "filter" not found in row: don't show! } } if (lev... |
public ChefGraph(Composite par, int style, Chef je) { super(par, style); shell = par.getShell(); log = LogWriter.getInstance(); chef = je; canvas = this; newProps(); selrect = null; hop_candidate = null; last_hop_split = null; selected_entries = null; selected_note = null; hori = getHorizontalBar(); vert = getVerti... | public ChefGraph(Composite par, int style, LogWriter l, Chef je) { this(par, style, je); } | public ChefGraph(Composite par, int style, Chef je) { super(par, style); shell = par.getShell(); log = LogWriter.getInstance(); chef = je; canvas = this; newProps(); selrect = null; hop_candidate = null; last_hop_split = null; selected_entries = null; selected_note = null; hori = g... |
public ChefLog(Composite parent, int style, Chef chef) { super(parent, style); shell=parent.getShell(); this.log=LogWriter.getInstance(); display=shell.getDisplay(); this.chef=chef; FormLayout formLayout = new FormLayout (); formLayout.marginWidth = Const.FORM_MARGIN; formLayout.marginHeight = Const.FORM_MARGIN; se... | public ChefLog(Composite parent, int style, LogWriter log, Chef chef) { this(parent, style, chef); } | public ChefLog(Composite parent, int style, Chef chef) { super(parent, style); shell=parent.getShell(); this.log=LogWriter.getInstance(); display=shell.getDisplay(); this.chef=chef; FormLayout formLayout = new FormLayout (); formLayout.marginWidth = Const.FORM_MARGIN; formLayout.marginHeight = Const.FORM_... |
public void addNote(int p, NotePadMeta ni) { notes.add(p, ni); changed_notes = true; | public void addNote(NotePadMeta ni) { notes.add(ni); setChanged(); | public void addNote(int p, NotePadMeta ni) { notes.add(p, ni); changed_notes = true; } |
Map<String, WsdlInfo> wsdls = model.getNamespacesToWSDLs(); for (String ns : wsdls.keySet()) { WsdlInfo wsdl = wsdls.get(ns); | for (WsdlInfo wsdl : ns2wsdl.values()) { | public void doFreemarkerGenerate() throws IOException, TemplateException { EnunciateFreemarkerModel model = getModel(); processTemplate(getTemplateURL(), model); HashMap<String, String> ns2artifact = new HashMap<String, String>(); HashMap<String, String> service2artifact = new HashMap<String, String>(); ... |
ns2artifact.put(ns, file); | ns2artifact.put(wsdl.getTargetNamespace(), file); | public void doFreemarkerGenerate() throws IOException, TemplateException { EnunciateFreemarkerModel model = getModel(); processTemplate(getTemplateURL(), model); HashMap<String, String> ns2artifact = new HashMap<String, String>(); HashMap<String, String> service2artifact = new HashMap<String, String>(); ... |
Map<String, SchemaInfo> schemas = model.getNamespacesToSchemas(); for (String ns : schemas.keySet()) { service2artifact.put(ns, schemas.get(ns).getFile()); | for (SchemaInfo schemaInfo : ns2schema.values()) { service2artifact.put(schemaInfo.getNamespace(), (String) schemaInfo.getProperty("file")); | public void doFreemarkerGenerate() throws IOException, TemplateException { EnunciateFreemarkerModel model = getModel(); processTemplate(getTemplateURL(), model); HashMap<String, String> ns2artifact = new HashMap<String, String>(); HashMap<String, String> service2artifact = new HashMap<String, String>(); ... |
lookup = new XMLAPILookup(ns2artifact, service2artifact); | XMLAPILookup lookup = new XMLAPILookup(ns2artifact, service2artifact); getEnunciate().setProperty(XMLAPILookup.class.getName(), lookup); | public void doFreemarkerGenerate() throws IOException, TemplateException { EnunciateFreemarkerModel model = getModel(); processTemplate(getTemplateURL(), model); HashMap<String, String> ns2artifact = new HashMap<String, String>(); HashMap<String, String> service2artifact = new HashMap<String, String>(); ... |
configuration.setDefaultEncoding("UTF-8"); | public void processTemplate() throws IOException, TemplateException { Configuration configuration = getConfiguration(); Template template = configuration.getTemplate(getTemplateURL().toString()); FreemarkerModel model = FreemarkerModel.get(); if (model == null) { throw new IOException("A model must b... | |
public ProviderNotFoundException(String message) { super(message); | public ProviderNotFoundException() { super(); | public ProviderNotFoundException(String message) { super(message); } |
TreeSet<String> importedNamespaces = new TreeSet<String>(); | HashSet<String> importedNamespaces = new HashSet<String>(); | public Set<String> getImportedNamespaces() { Collection<EndpointInterface> endpointInterfaces = getEndpointInterfaces(); if ((endpointInterfaces == null) || (endpointInterfaces.size() == 0)) { throw new IllegalStateException("WSDL for " + getTargetNamespace() + " has no endpoint interfaces!"); } Tree... |
TreeSet<String> namespaces = new TreeSet<String>(); | HashSet<String> namespaces = new HashSet<String>(); | public Set<String> getReferencedNamespaces() { TreeSet<String> namespaces = new TreeSet<String>(); namespaces.add(getTargetNamespace()); Collection<WebMethod> webMethods = getWebMethods(); for (WebMethod webMethod : webMethods) { namespaces.addAll(webMethod.getReferencedNamespaces()); } return ... |
TypeCreator typeCreator = createTypeCreator(); | public IntrospectingTypeRegistry(String typeSetId) { super(true); InputStream typesList = getClass().getResourceAsStream("/" + typeSetId + ".types"); if (typesList == null) { throw new IllegalArgumentException("Unknown type set: " + typeSetId); } BufferedReader reader = new BufferedReader(new Inpu... | |
public int execute() throws IOException, InterruptedException, | public static int execute( String commands) throws IOException, InterruptedException, NullPointerException, | public /*@pure@*/ int execute() throws IOException, InterruptedException, SecurityException, IllegalArgumentException { return execute((Properties) null); } |
return execute((Properties) null); } | return execute(commands, null, null, null); } | public /*@pure@*/ int execute() throws IOException, InterruptedException, SecurityException, IllegalArgumentException { return execute((Properties) null); } |
public SimpleCrossProductAlphabet(List a, Alphabet parent) | public SimpleCrossProductAlphabet(List a) | public SimpleCrossProductAlphabet(List a, Alphabet parent) throws IllegalAlphabetException { this.parent = parent; for(Iterator i = a.iterator(); i.hasNext(); ) { Alphabet aa = (Alphabet) i.next(); if(! (aa instanceof FiniteAlphabet) ) { throw new IllegalAlphabetException( "Can't crea... |
this.parent = parent; for(Iterator i = a.iterator(); i.hasNext(); ) { Alphabet aa = (Alphabet) i.next(); if(! (aa instanceof FiniteAlphabet) ) { throw new IllegalAlphabetException( "Can't create a SimpleCrossProductAlphabet over non-fininte alphabet " + aa.getName() + " of type " + aa.getClass() ); } } alphas = ListToo... | this(a, null); | public SimpleCrossProductAlphabet(List a, Alphabet parent) throws IllegalAlphabetException { this.parent = parent; for(Iterator i = a.iterator(); i.hasNext(); ) { Alphabet aa = (Alphabet) i.next(); if(! (aa instanceof FiniteAlphabet) ) { throw new IllegalAlphabetException( "Can't crea... |
public long saveJobEntryAttribute(long id_job, long id_jobentry, String code, double value) | public long saveJobEntryAttribute(long id_job, long id_jobentry, String code, String value) | public long saveJobEntryAttribute(long id_job, long id_jobentry, String code, double value) throws KettleDatabaseException { return saveJobEntryAttribute(code, 0, id_job, id_jobentry, value, null); } |
return saveJobEntryAttribute(code, 0, id_job, id_jobentry, value, null); | return saveJobEntryAttribute(code, 0, id_job, id_jobentry, 0.0, value); | public long saveJobEntryAttribute(long id_job, long id_jobentry, String code, double value) throws KettleDatabaseException { return saveJobEntryAttribute(code, 0, id_job, id_jobentry, value, null); } |
public final static int getAccessType(String dbaccess) { int i; if (dbaccess==null) return TYPE_ACCESS_NATIVE; for (i=0;i<dbAccessTypeCode.length;i++) { if (dbAccessTypeCode[i].equalsIgnoreCase(dbaccess)) { return i; } } for (i=0;i<dbAccessTypeDesc.length;i++) { if (dbAccessTypeDesc[i].equalsIgnoreCase(dbaccess)) { r... | public int getAccessType() { return databaseInterface.getAccessType(); | public final static int getAccessType(String dbaccess) { int i; if (dbaccess==null) return TYPE_ACCESS_NATIVE; for (i=0;i<dbAccessTypeCode.length;i++) { if (dbAccessTypeCode[i].equalsIgnoreCase(dbaccess)) { return i; } } for (i=0;i<dbAccessTypeDesc.length;i++) { if (dbAccessTypeDesc[i].equalsIgn... |
DOMWriter domWriter = new DOMWriter(xmlDocument); Element pointElt = domWriter.addElement("om:featureOfInterest/sos:GeoReferenceableFeature/gml:location/gml:Point"); domWriter.setAttributeValue(pointElt, "srs", "urn:ogc:def:crs:EPSG:6.1:4329"); domWriter.setElementValue(pointElt, "", location.x + " " + location.y + " "... | try { DOMWriter domWriter = new DOMWriter(xmlDocument); Element pointElt = domWriter.addElement("om:featureOfInterest/sos:GeoReferenceableFeature/gml:location/gml:Point"); domWriter.setAttributeValue(pointElt, "srs", "urn:ogc:def:crs:EPSG:6.1:4329"); domWriter.setElementValue(pointElt, "", location.x + " " + location.y... | public void setFoiLocation(Vector3d location) { DOMWriter domWriter = new DOMWriter(xmlDocument); Element pointElt = domWriter.addElement("om:featureOfInterest/sos:GeoReferenceableFeature/gml:location/gml:Point"); domWriter.setAttributeValue(pointElt, "srs", "urn:ogc:def:crs:EPSG:6.1:4329");... |
DOMReader templates = null; try { InputStream templateFile = SOSObservationSerializer.class.getResourceAsStream("templates.xml"); templates = new DOMReader(templateFile, false); } catch (DOMReaderException e) { e.printStackTrace(); } DOMReader domReader = new DOMReader(xmlDocument); NodeList eventTimes = domReader.... | try { time.setTimeZone(zone); DOMWriter domWriter = new DOMWriter(xmlDocument); Element obsTimeElt = domWriter.addElement("om:eventTime"); GMLTimeWriter timeWriter = new GMLTimeWriter(); Element timeElt = timeWriter.writeTime(domWriter, time); obsTimeElt.appendChild(timeElt); } catch (Exception e) { e.printStackTrace()... | public void setTime(TimeInfo time, int zone) { DOMReader templates = null; try { // preload templates doc InputStream templateFile = SOSObservationSerializer.class.getResourceAsStream("templates.xml"); templates = new DOMReader(templateFile, false); } catch (DOMReaderException e) { e.printStackTrace();... |
public List discover(Identifier identifier) | public List discover(String identifier) | public List discover(Identifier identifier) throws DiscoveryException { if (identifier instanceof XriIdentifier) { XRDS xrds; XriIdentifier xriIdentifier = (XriIdentifier) identifier; try { TrustType trustAll = new TrustType(Trus... |
if (identifier instanceof XriIdentifier) { XRDS xrds; XriIdentifier xriIdentifier = (XriIdentifier) identifier; try { TrustType trustAll = new TrustType(TrustType.TRUST_NONE); xrds = _xriResolver.resolveAuthToXRDS( xriIdentifier.getXriIdentifier(), trustAll, true, new ResolverState()); XRD xrd = xrds.getFinalXRD(); C... | return discover(parseIdentifier(identifier)); | public List discover(Identifier identifier) throws DiscoveryException { if (identifier instanceof XriIdentifier) { XRDS xrds; XriIdentifier xriIdentifier = (XriIdentifier) identifier; try { TrustType trustAll = new TrustType(Trus... |
public Result execStatement(String sql, Row params) throws KettleDatabaseException | public Result execStatement(String sql) throws KettleDatabaseException | public Result execStatement(String sql, Row params) throws KettleDatabaseException { Result result = new Result(); try { boolean resultSet; int count; if (params!=null) { PreparedStatement prep_stmt = connection.prepareStatement(databaseMeta.stripCR(sql)); setValues(params, pre... |
Result result = new Result(); try { boolean resultSet; int count; if (params!=null) { PreparedStatement prep_stmt = connection.prepareStatement(databaseMeta.stripCR(sql)); setValues(params, prep_stmt); resultSet = prep_stmt.execute(); count = prep_stmt.getUpdateCount(); prep_stmt.close(); } else { String sqlStripped = ... | return execStatement(sql, null); | public Result execStatement(String sql, Row params) throws KettleDatabaseException { Result result = new Result(); try { boolean resultSet; int count; if (params!=null) { PreparedStatement prep_stmt = connection.prepareStatement(databaseMeta.stripCR(sql)); setValues(params, pre... |
public AtomIterator(Group g) { structure = null; group = g ; | public AtomIterator(Structure struct) { structure = struct; | public AtomIterator(Group g) { structure = null; group = g ; current_atom_pos = -1 ; groupiter = null ; } |
groupiter = null ; | public AtomIterator(Group g) { structure = null; group = g ; current_atom_pos = -1 ; groupiter = null ; } | |
groupiter = new GroupIterator(structure) ; if ( groupiter.hasNext() ) { group = (Group) groupiter.next() ; } else group = null ; | public AtomIterator(Group g) { structure = null; group = g ; current_atom_pos = -1 ; groupiter = null ; } | |
public void write(String str) throws IOException | public void write(int c) throws IOException | public void write(String str) throws IOException { synchronized(lock) { int len = str.length(); for (int i = 0; i < len; i++) { int c = str.charAt(i); if(c == '<') { out.write(LT); } ... |
int len = str.length(); for (int i = 0; i < len; i++) | if(c == '<') | public void write(String str) throws IOException { synchronized(lock) { int len = str.length(); for (int i = 0; i < len; i++) { int c = str.charAt(i); if(c == '<') { out.write(LT); } ... |
int c = str.charAt(i); if(c == '<') { out.write(LT); } else if(c == '>') { out.write(GT); } else if(c == '&') { out.write(AMP); } else { out.write(c); } | out.write(LT); } else if(c == '>') { out.write(GT); } else if(c == '&') { out.write(AMP); } else { out.write(c); | public void write(String str) throws IOException { synchronized(lock) { int len = str.length(); for (int i = 0; i < len; i++) { int c = str.charAt(i); if(c == '<') { out.write(LT); } ... |
if ((!"##default".equals(wrapper.namespace())) && (!element.getTypeDefinition().getTargetNamespace().equals(wrapper.namespace()))) { | String namespace = wrapper.namespace(); String typeNamespace = element.getTypeDefinition().getTargetNamespace(); if (namespace == null) { namespace = ""; } if (typeNamespace == null) { typeNamespace = ""; } if ((!"##default".equals(namespace)) && (!typeNamespace.equals(namespace))) { | public ValidationResult validateElement(Element element) { ValidationResult result = validateAccessor(element); XmlElements xmlElements = element.getAnnotation(XmlElements.class); if ((element.isCollectionType()) && (element.getBaseType() != KnownXmlType.ANY_TYPE) && (xmlElements != null) && (xmlElement... |
if ((!"##default".equals(wrapper.namespace())) && (!elementRef.getTypeDefinition().getTargetNamespace().equals(wrapper.namespace()))) { | String namespace = wrapper.namespace(); String typeNamespace = elementRef.getTypeDefinition().getTargetNamespace(); if (namespace == null) { namespace = ""; } if (typeNamespace == null) { typeNamespace = ""; } if ((!"##default".equals(namespace)) && (!typeNamespace.equals(namespace))) { | public ValidationResult validateElementRef(ElementRef elementRef) { ValidationResult result = validateAccessor(elementRef); if (elementRef.getChoices().isEmpty()) { XmlTypeMirror baseType = elementRef.getBaseType(); result.addError(elementRef.getPosition(), "No root elements found for " + new QName(ba... |
public MenuItem(String name, int index) { super(null); | public MenuItem(String name, int index, int iconIndex) { super(RosterIcons.getInstance()); | public MenuItem(String name, int index) { super(null); this.index=index; this.name=name; } |
this.iconIndex=iconIndex; | public MenuItem(String name, int index) { super(null); this.index=index; this.name=name; } | |
autoAwayTime=cf.autoAwayTime*60; setAutoStatus=cf.setAutoStatus; | public Roster(Display display /*, boolean selAccount*/) { super(); setProgress(24); //setTitleImages(StaticData.getInstance().rosterIcons); this.display=display; cf=Config.getInstance(); //msgNotify=new EventNotify(display, Profile.getProfile(0) ); ... | |
if (cf.autoJoinConferences) { String server="conference."+sd.account.getServer(); String room=cf.defGcRoom; int roomE=room.indexOf('@'); if (roomE>0) { server=room.substring(roomE+1); room=room.substring(0, roomE); } String nick=sd.account.getNickName(); StringBuffer gchat=new StringBuffer(room.trim()); gchat.append('... | public void loginSuccess() { // залогинились. теперь, если был реконнект, то просто пошлём статус if (reconnect) { querysign=reconnect=false; //sendPresence(myStatus); sendPresence(cf.loginstatus); return; } // иначе будем читать ростер... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.