bugged stringlengths 6 599k | fixed stringlengths 6 40.8M | __index_level_0__ int64 0 3.24M |
|---|---|---|
public void testAndHeresHowWeUnlinkThings() throws Exception { // Method 1: saveImage(); List updated = unlinkImage(); iUpdate.saveCollection( updated ); fail("test that row is gone."); // Method 2: saveImage(); updated = unlinkImage(); ... | public void testAndHeresHowWeUnlinkThings() throws Exception { // Method 1: saveImage(); List updated = unlinkImage(); iUpdate.saveCollection( updated ); List list = iQuery.getListByFieldEq( DatasetImageLink.class, "child.id", img.getId() ); assertTrue( list.size() == ... | 3,228,344 |
public void testAndHeresHowWeUnlinkThings() throws Exception { // Method 1: saveImage(); List updated = unlinkImage(); iUpdate.saveCollection( updated ); fail("test that row is gone."); // Method 2: saveImage(); updated = unlinkImage(); ... | public void testAndHeresHowWeUnlinkThings() throws Exception { // Method 1: saveImage(); List updated = unlinkImage(); iUpdate.saveCollection( updated ); fail("test that row is gone."); // Method 2: saveImage(); updated = unlinkImage(); ... | 3,228,345 |
public void testAndSaveSomtheingWithParents() throws Exception { saveImage(); ds = (Dataset) img.iterateOverDatasetLinks().next(); Long id = ds.getId(); // another copy Image img2 = (Image) iQuery.queryUnique( "select i from Image i " + "le... | public void testAndSaveSomtheingWithParents() throws Exception { saveImage(); ds = (Dataset) img.linkedDatasetIterator().next(); Long id = ds.getId(); // another copy Image img2 = (Image) iQuery.queryUnique( "select i from Image i " + "left... | 3,228,346 |
public void testAndSaveSomtheingWithParents() throws Exception { saveImage(); ds = (Dataset) img.iterateOverDatasetLinks().next(); Long id = ds.getId(); // another copy Image img2 = (Image) iQuery.queryUnique( "select i from Image i " + "le... | public void testAndSaveSomtheingWithParents() throws Exception { saveImage(); ds = (Dataset) img.iterateOverDatasetLinks().next(); Long id = ds.getId(); // another copy Image img2 = (Image) iQuery.queryUnique( "select i from Image i " + "le... | 3,228,347 |
private List unlinkImage() { List updated = img.collectFromDatasetLinks( new CBlock() { public Object call(IObject arg0) { img.unlinkDataset( (Dataset) arg0 ); return arg0; } }); updated.add( img ); return updated; } | private List unlinkImage() { List updated = img.eachLinkedDataset( new CBlock() { public Object call(IObject arg0) { img.unlinkDataset( (Dataset) arg0 ); return arg0; } }); updated.add( img ); return updated; } | 3,228,348 |
private void mousePressedLinkingModules(PNode node,PInputEvent e) { int count = e.getClickCount(); if (count ==2) { if (node instanceof FormalParameter) { FormalParameter p = (FormalParameter) node; ModuleView mod = p.getModuleView(); finishModuleLinks(mod); } else if (node instanceof ModuleView) { ... | private void mousePressedLinkingModules(PNode node,PInputEvent e) { int count = e.getClickCount(); if (count ==2) { if (node instanceof FormalParameter) { FormalParameter p = (FormalParameter) node; ModuleView mod = p.getModuleView(); finishModuleLinks(mod); } else if (node instanceof ModuleView) { ... | 3,228,352 |
public IRubyObject initialize(IRubyObject[] args) { int count = checkArgumentCount(args, 1, 2); int newFileno = RubyNumeric.fix2int(args[0]); String mode = null; if (count > 1) { mode = args[1].convertToString().getValue(); } // See if we already have thi... | public IRubyObject initialize(IRubyObject[] args) { int count = checkArgumentCount(args, 1, 2); int newFileno = RubyNumeric.fix2int(args[0]); String mode = null; if (count > 1) { mode = args[1].convertToString().toString(); } // See if we already have thi... | 3,228,354 |
public IRubyObject internalGets(IRubyObject[] args) { checkReadable(); IRubyObject sepVal = getRuntime().getGlobalVariables().get("$/"); if (args.length > 0) { sepVal = args[0]; } String separator = sepVal.isNil() ? null : ((RubyString) sepVal).getValue(); ... | public IRubyObject internalGets(IRubyObject[] args) { checkReadable(); IRubyObject sepVal = getRuntime().getGlobalVariables().get("$/"); if (args.length > 0) { sepVal = args[0]; } String separator = sepVal.isNil() ? null : ((RubyString) sepVal).toString(); ... | 3,228,355 |
public IRubyObject reopen(IRubyObject[] args) { if (args.length < 1) { throw getRuntime().newArgumentError("wrong number of arguments"); } if (args[0].isKindOf(getRuntime().getClass("IO"))) { RubyIO ios = (RubyIO) args[0]; int keepFileno = handler.getFileno(); ... | public IRubyObject reopen(IRubyObject[] args) { if (args.length < 1) { throw getRuntime().newArgumentError("wrong number of arguments"); } if (args[0].isKindOf(getRuntime().getClass("IO"))) { RubyIO ios = (RubyIO) args[0]; int keepFileno = handler.getFileno(); ... | 3,228,356 |
public IRubyObject reopen(IRubyObject[] args) { if (args.length < 1) { throw getRuntime().newArgumentError("wrong number of arguments"); } if (args[0].isKindOf(getRuntime().getClass("IO"))) { RubyIO ios = (RubyIO) args[0]; int keepFileno = handler.getFileno(); ... | public IRubyObject reopen(IRubyObject[] args) { if (args.length < 1) { throw getRuntime().newArgumentError("wrong number of arguments"); } if (args[0].isKindOf(getRuntime().getClass("IO"))) { RubyIO ios = (RubyIO) args[0]; int keepFileno = handler.getFileno(); ... | 3,228,357 |
public IOModes(IRuby runtime, String modesString) { this(runtime, convertModesStringToModesInt(runtime, modesString)); } | public IOModes(IRuby runtime, String modesString) { this(runtime, convertModesStringToModesInt(runtime, modesString)); } | 3,228,358 |
public int getc() throws IOException, BadDescriptorException { checkReadable(); int c = read(); if (c == -1) { return c; } return c & 0xff; } | public int getc() throws IOException, BadDescriptorException { checkReadable(); int c = read(); if (c == -1) { return c; } return c & 0xff; } | 3,228,359 |
public abstract void sync() throws IOException; | public abstract void sync() throws IOException, BadDescriptorException; | 3,228,360 |
public String gets(String separatorString) throws IOException, BadDescriptorException { checkReadable(); if (separatorString == null) { return getsEntireStream(); } final char[] separator = separatorString.equals(PARAGRAPH_DELIMETER) ? "\n\n".toCharArr... | public String gets(String separatorString) throws IOException, BadDescriptorException { checkReadable(); if (separatorString == null) { return getsEntireStream(); } final char[] separator = separatorString.equals(PARAGRAPH_DELIMETER) ? "\n\n".toCharArr... | 3,228,361 |
public void putc(int c) throws IOException, BadDescriptorException { try { syswrite("" + (char) c); // LAME } catch (IOException e) { } } | public void putc(int c) throws IOException, BadDescriptorException { try { syswrite("" + (char) c); // LAME } catch (IOException e) { } } | 3,228,362 |
public String read(int number) throws IOException, BadDescriptorException { try { if (ungotc >= 0) { String buf2 = sysread(number - 1); int c = ungotc; ungotc = -1; return c + buf2; } return sysread(numb... | public String read(int number) throws IOException, BadDescriptorException { try { if (ungotc >= 0) { String buf2 = sysread(number - 1); int c = ungotc; ungotc = -1; return c + buf2; } return sysread(numb... | 3,228,363 |
public String getsEntireStream() throws IOException { StringBuffer result = new StringBuffer(); int c; while ((c = read()) != -1) { result.append((char) c); } // We are already at EOF if (result.length() == 0) { return null; } ... | public String getsEntireStream() throws IOException { StringBuffer result = new StringBuffer(); int c; while ((c = read()) != -1) { result.append((char) c); } // We are already at EOF if (result.length() == 0) { return null; } ... | 3,228,364 |
public IOHandlerSeekable(IRuby runtime, String path, IOModes modes) throws IOException, InvalidValueException { super(runtime); this.path = path; this.modes = modes; NormalizedFile theFile = (NormalizedFile)new NormalizedFile(path).getAbsoluteFile(); if (theFile.exist... | public IOHandlerSeekable(IRuby runtime, String path, IOModes modes) throws IOException, InvalidValueException { super(runtime); this.path = path; this.modes = modes; NormalizedFile theFile = new NormalizedFile(path); if (!theFile.isAbsolute()) { theFile = (NormalizedFile)ne... | 3,228,365 |
public String sysread(int number) throws IOException, BadDescriptorException { if (!isOpen()) { throw new IOException("File not open"); } checkReadable(); StringBuffer buf = new StringBuffer(); int position = 0; while (position < number) { ... | public String sysread(int number) throws IOException, BadDescriptorException { if (!isOpen()) { throw new IOException("File not open"); } checkReadable(); StringBuffer buf = new StringBuffer(); int position = 0; while (position < number) { ... | 3,228,366 |
public void ungetc(int c) { // Ruby silently ignores negative ints for some reason? if (c >= 0) { ungotc = c; } } | public void ungetc(int c) { // Ruby silently ignores negative ints for some reason? if (c >= 0) { ungotc = c; } } | 3,228,367 |
public int write(String string) throws IOException, BadDescriptorException { return syswrite(string); } | public int write(String string) throws IOException, BadDescriptorException { return syswrite(string); } | 3,228,368 |
public BrowserInternalFrame(BrowserController theController) { setSize(600,600); setDefaultCloseOperation(JInternalFrame.DISPOSE_ON_CLOSE); if(theController != null) { this.controller = theController; String title = controller.getName(); setTit... | public BrowserInternalFrame(BrowserController theController) { setSize(600,600); setDefaultCloseOperation(JInternalFrame.DISPOSE_ON_CLOSE); if(theController != null) { this.controller = theController; String title = controller.getName(); setTit... | 3,228,369 |
public BrowserInternalFrame(BrowserController theController) { setSize(600,600); setDefaultCloseOperation(JInternalFrame.DISPOSE_ON_CLOSE); if(theController != null) { this.controller = theController; String title = controller.getName(); setTit... | public BrowserInternalFrame(BrowserController theController) { setSize(600,600); setDefaultCloseOperation(JInternalFrame.DISPOSE_ON_CLOSE); if(theController != null) { this.controller = theController; String title = controller.getName(); setTit... | 3,228,370 |
public void cameraBoundsChanged(double valueX, double valueY, double extentX, double extentY, double width, double height) { int iX = (int)Math.round(valueX); int iY = (int)Math.rou... | public void cameraBoundsChanged(double valueX, double valueY, double extentX, double extentY, double width, double height) { int iX = (int)Math.round(valueX); int iY = (int)Math.rou... | 3,228,371 |
public void cameraBoundsChanged(double valueX, double valueY, double extentX, double extentY, double width, double height) { int iX = (int)Math.round(valueX); int iY = (int)Math.rou... | public void cameraBoundsChanged(double valueX, double valueY, double extentX, double extentY, double width, double height) { int iX = (int)Math.round(valueX); int iY = (int)Math.rou... | 3,228,372 |
public void removeBrowser(BrowserController browser) { if (browser != null && browserList.contains(browser)) { browserList.remove(browser); } } | public void removeBrowser(UIWrapper browser) { if (browser != null && browserList.contains(browser)) { browserList.remove(browser); } } | 3,228,377 |
public void test_IObjectClassQuery_unique() throws Exception { p = new Parameters() .addClass( Project.class ); p.getFilter().unique(); Query q = new IObjectClassQuery(p); iQuery.execute( q ); } | public void test_IObjectClassQuery_unique() throws Exception { p = new Parameters() .addClass( Project.class ) .addLong( "id", getNewProjects(1,TICKET_83).iterator().next()); p.getFilter().unique(); Query q = new IObjectClassQuery(p); iQuery.execute( q ); } | 3,228,378 |
public PojosLoadHierarchyQueryDefinition(Parameters parameters) { super( parameters); } | public PojosLoadHierarchyQueryDefinition(Parameters parameters) { super( defs, parameters ); } | 3,228,379 |
public StringQuery(QueryParameter...parameters ){ super(parameters); } | public StringQuery(QueryParameter...parameters ){ super( defs, parameters ); } | 3,228,380 |
public void setAnnotations(Map map) { if (model.getState() == LOADING_ANNOTATION) { if (map == null) throw new IllegalArgumentException("No annotations."); model.setAnnotations(map); view.showAnnotations(); if (model.hasThumbnail()) ... | public void setAnnotations(Map map) { if (model.getState() == LOADING_ANNOTATION) { if (map == null) throw new IllegalArgumentException("No annotations."); model.setAnnotations(map); view.showAnnotations(); if (model.hasThumbnail()) ... | 3,228,381 |
public Node block_append(Node head, Node tail) { if (tail == null || head == null) { return tail; } Node end; if (head instanceof BlockNode) { end = ((BlockNode)head).getEndNode(); } else { end = nf.newBlock(head); end.setEndNode(end); ... | public Node block_append(Node head, Node tail) { if (tail == null) { return head; } else if (head == null) { return tail; } Node end; if (head instanceof BlockNode) { end = ((BlockNode)head).getEndNode(); } else { end = nf.newBlock(head); ... | 3,228,382 |
protected Object initialValue() { return new ThreadContext(Ruby.this); } | protected Object initialValue() { return mainContext; } | 3,228,383 |
public Parser(Ruby ruby) { this.ruby = ruby; internalParser.setErrorHandler(ruby.getErrorHandler()); } | public Parser(Ruby ruby) { this.ruby = ruby; internalParser.setErrorHandler(ruby.getErrorHandler()); } | 3,228,384 |
public static ILoadService createLoadService() { return new LoadService(); } | public static ILoadService createLoadService() { return new LoadService(); } | 3,228,385 |
public void push() { this.push(new Scope(ruby)); } | public void push() { this.push(new Scope(ruby)); } | 3,228,387 |
public RubyClasses(Ruby ruby) { this.ruby = ruby; classMap = new RubyHashMap(); initCoreClasses(); } | public RubyClasses(Ruby ruby) { this.ruby = ruby; classMap = new RubyHashMap(); } | 3,228,388 |
private void initCoreClasses() { RubyClass metaClass; objectClass = defineBootClass("Object", null); moduleClass = defineBootClass("Module", objectClass); classClass = defineBootClass("Class", moduleClass); metaClass = classClass.newSingletonClass(); objectC... | public void initCoreClasses() { RubyClass metaClass; objectClass = defineBootClass("Object", null); moduleClass = defineBootClass("Module", objectClass); classClass = defineBootClass("Class", moduleClass); metaClass = classClass.newSingletonClass(); objectCl... | 3,228,389 |
private void initCoreClasses() { RubyClass metaClass; objectClass = defineBootClass("Object", null); moduleClass = defineBootClass("Module", objectClass); classClass = defineBootClass("Class", moduleClass); metaClass = classClass.newSingletonClass(); objectC... | private void initCoreClasses() { RubyClass metaClass; objectClass = defineBootClass("Object", null); moduleClass = defineBootClass("Module", objectClass); classClass = defineBootClass("Class", moduleClass); metaClass = classClass.newSingletonClass(); objectC... | 3,228,390 |
public RubyExceptions(Ruby ruby) { this.ruby = ruby; } | public RubyExceptions(Ruby ruby) { this.ruby = ruby; } | 3,228,391 |
public void initDefaultExceptionClasses() { RubyClass exceptionClass = ruby.getClasses().getExceptionClass(); systemExit = ruby.defineClass("SystemExit", exceptionClass); fatal = ruby.defineClass("Fatal", exceptionClass); interrupt = ruby.defineClass("Interrupt", exceptionClass); signalException = ruby.defineCl... | public void initDefaultExceptionClasses() { RubyClass exceptionClass = ruby.getClasses().getExceptionClass(); systemExit = ruby.defineClass("SystemExit", exceptionClass); fatal = ruby.defineClass("Fatal", exceptionClass); interrupt = ruby.defineClass("Interrupt", exceptionClass); signalException = ruby.defineCl... | 3,228,392 |
public static IRubyObject createTopSelf(final Ruby runtime) { IRubyObject topSelf = runtime.getFactory().newObject(runtime.getClasses().getObjectClass()); topSelf.defineSingletonMethod("to_s", new Callback() { /** * @see org.jruby.runtime.Callback#execute(IRubyObject, IR... | public static IRubyObject createTopSelf(final Ruby runtime) { IRubyObject topSelf = runtime.getFactory().newObject(runtime.getClasses().getObjectClass()); topSelf.defineSingletonMethod("to_s", new Callback() { /** * @see org.jruby.runtime.Callback#execute(IRubyObject, IR... | 3,228,393 |
public static IRubyObject createTopSelf(final Ruby runtime) { IRubyObject topSelf = runtime.getFactory().newObject(runtime.getClasses().getObjectClass()); topSelf.defineSingletonMethod("to_s", new Callback() { /** * @see org.jruby.runtime.Callback#execute(IRubyObject, IR... | public static IRubyObject createTopSelf(final Ruby runtime) { IRubyObject topSelf = runtime.getFactory().newObject(runtime.getClasses().getObjectClass()); topSelf.defineSingletonMethod("to_s", new Callback() { /** * @see org.jruby.runtime.Callback#execute(IRubyObject, IR... | 3,228,394 |
public static IRubyObject createTopSelf(final Ruby runtime) { IRubyObject topSelf = runtime.getFactory().newObject(runtime.getClasses().getObjectClass()); topSelf.defineSingletonMethod("to_s", new Callback() { /** * @see org.jruby.runtime.Callback#execute(IRubyObject, IR... | public static IRubyObject createTopSelf(final Ruby runtime) { IRubyObject topSelf = runtime.getFactory().newObject(runtime.getClasses().getObjectClass()); topSelf.defineSingletonMethod("to_s", new Callback() { /** * @see org.jruby.runtime.Callback#execute(IRubyObject, IR... | 3,228,395 |
public INode parse(String file, Reader content) { return parse(file, content, new RubyParserConfiguration()); } | public INode parse(String file, Reader content) { return parse(file, content, new RubyParserConfiguration()); } | 3,228,396 |
public Set<Token> allTokens() { if ( tokens.get() == null) return Collections.emptySet(); return tokens.get().keySet(); } | public Set<Token> allTokens() { if ( tokens.get() == null) return Collections.emptySet(); return tokens.get().keySet(); } | 3,228,397 |
public Token find(GraphHolder gh) { if ( tokens.get() == null ) return null; for (Token t : allTokens()) { if (gh.tokenMatches(t)) { return t; } } return null; } | public Token find(GraphHolder gh) { if ( tokens.get() == null ) return null; for (Token t : allTokens()) { if (gh.tokenMatches(t)) { return t; } } return null; } | 3,228,398 |
public Token find(GraphHolder gh) { if ( tokens.get() == null ) return null; for (Token t : allTokens()) { if (gh.tokenMatches(t)) { return t; } } return null; } | public Token find(GraphHolder gh) { if ( tokens.get() == null ) return null; for (Token t : allTokens()) { if (gh.tokenMatches(t)) { return t; } } return null; } | 3,228,399 |
public void put(Token token) { if ( tokens.get() == null ) tokens.set( new IdentityHashMap<Token,Token>() ); tokens.get().put(token, token); } | public void put(Token token) { if ( tokens.get() == null ) tokens.set( new IdentityHashMap<Token,Token>() ); tokens.get().put(token, token); } | 3,228,400 |
public void remove(Token t) { if ( tokens.get() == null ) return; tokens.get().remove(t); } | public void remove(Token t) { if ( tokens.get() == null ) return; tokens.get().remove(t); } | 3,228,401 |
public BasicSecuritySystem( ServiceFactory factory, EventContext eventContext) { Assert.notNull(factory); Assert.notNull(eventContext); this.sf = factory; this.ec = eventContext; } | public BasicSecuritySystem( ServiceFactory factory, EventContext eventContext) { Assert.notNull(factory); Assert.notNull(eventContext); this.sf = factory; this.ec = eventContext; } | 3,228,402 |
public void addLog( String action, Class klass, Long id ) { Assert.notNull(action); Assert.notNull(klass); Assert.notNull(id); if ( Event.class.isAssignableFrom( klass ) || EventLog.class.isAssignableFrom( klass ) || EventDiff.class.isAssignableFrom( klass ) ) ... | public void addLog( String action, Class klass, Long id ) { Assert.notNull(action); Assert.notNull(klass); Assert.notNull(id); if ( Event.class.isAssignableFrom( klass ) || EventLog.class.isAssignableFrom( klass ) || EventDiff.class.isAssignableFrom( klass ) ) ... | 3,228,403 |
public void addLog( String action, Class klass, Long id ) { Assert.notNull(action); Assert.notNull(klass); Assert.notNull(id); if ( Event.class.isAssignableFrom( klass ) || EventLog.class.isAssignableFrom( klass ) || EventDiff.class.isAssignableFrom( klass ) ) ... | public void addLog( String action, Class klass, Long id ) { Assert.notNull(action); Assert.notNull(klass); Assert.notNull(id); if ( Event.class.isAssignableFrom( klass ) || EventLog.class.isAssignableFrom( klass ) || EventDiff.class.isAssignableFrom( klass ) ) ... | 3,228,404 |
public boolean allowCreation( IObject iObject ) { Assert.notNull(iObject); Class cls = iObject.getClass(); if ( hasPrivilegedToken( iObject ) || currentUserIsAdmin() ) { return true; } else if ( isSystemType( (Class<? extends IObject>) cls )) { return false; } return true; } | public boolean allowCreation( IObject iObject ) { Assert.notNull(iObject); Class cls = iObject.getClass(); if ( hasPrivilegedToken( iObject ) || currentUserIsAdmin() ) { return true; } else if ( isSystemType( (Class<? extends IObject>) cls )) { return false; } return true; } | 3,228,405 |
public boolean allowCreation( IObject iObject ) { Assert.notNull(iObject); Class cls = iObject.getClass(); if ( hasPrivilegedToken( iObject ) || currentUserIsAdmin() ) { return true; } else if ( isSystemType( (Class<? extends IObject>) cls )) { return false; } return true; } | public boolean allowCreation( IObject iObject ) { Assert.notNull(iObject); Class cls = iObject.getClass(); if ( hasPrivilegedToken( iObject ) || currentUserIsAdmin() ) { return true; } else if ( isSystemType( (Class<? extends IObject>) cls )) { return false; } return true; } | 3,228,406 |
public boolean allowCreation( IObject iObject ) { Assert.notNull(iObject); Class cls = iObject.getClass(); if ( hasPrivilegedToken( iObject ) || currentUserIsAdmin() ) { return true; } else if ( isSystemType( (Class<? extends IObject>) cls )) { return false; } return true; } | public boolean allowCreation( IObject iObject ) { Assert.notNull(iObject); Class cls = iObject.getClass(); if ( hasPrivilegedToken( iObject ) || currentUserIsAdmin() ) { return true; } else if ( isSystemType( (Class<? extends IObject>) cls )) { return false; } return true; } | 3,228,407 |
public boolean allowCreation( IObject iObject ) { Assert.notNull(iObject); Class cls = iObject.getClass(); if ( hasPrivilegedToken( iObject ) || currentUserIsAdmin() ) { return true; } else if ( isSystemType( (Class<? extends IObject>) cls )) { return false; } return true; } | public boolean allowCreation( IObject iObject ) { Assert.notNull(iObject); Class cls = iObject.getClass(); if ( hasPrivilegedToken( iObject ) || currentUserIsAdmin() ) { return true; } else if ( isSystemType( (Class<? extends IObject>) cls )) { return false; } return true; } | 3,228,408 |
public boolean allowDelete( IObject iObject, Details trustedDetails ) { return allowUpdateOrDelete(iObject,trustedDetails); } | public boolean allowDelete( IObject iObject, Details trustedDetails ) { return allowUpdateOrDelete(iObject,trustedDetails); } | 3,228,409 |
public boolean allowLoad( Class<? extends IObject> klass, Details d ) { Assert.notNull(klass); Assert.notNull(d); if ( isSystemType(klass)) return true; return SecurityFilter.passesFilter(this, d); } | public boolean allowLoad( Class<? extends IObject> klass, Details d ) { Assert.notNull(klass); Assert.notNull(d); if ( isSystemType(klass)) return true; return SecurityFilter.passesFilter(this, d); } | 3,228,410 |
public boolean allowLoad( Class<? extends IObject> klass, Details d ) { Assert.notNull(klass); Assert.notNull(d); if ( isSystemType(klass)) return true; return SecurityFilter.passesFilter(this, d); } | public boolean allowLoad( Class<? extends IObject> klass, Details d ) { Assert.notNull(klass); Assert.notNull(d); if ( isSystemType(klass)) return true; return SecurityFilter.passesFilter(this, d); } | 3,228,411 |
public boolean allowUpdate( IObject iObject, Details trustedDetails ) { return allowUpdateOrDelete(iObject,trustedDetails); } | public boolean allowUpdate( IObject iObject, Details trustedDetails ) { return allowUpdateOrDelete(iObject,trustedDetails); } | 3,228,412 |
private boolean allowUpdateOrDelete(IObject iObject, Details trustedDetails) { Assert.notNull(iObject); // needs no details info if ( hasPrivilegedToken( iObject ) || currentUserIsAdmin() ) return true; else if ( isSystemType( (Class<? extends IObject>) iObject.getClass())) { return false; } // previou... | private boolean allowUpdateOrDelete(IObject iObject, Details trustedDetails) { Assert.notNull(iObject); // needs no details info if ( hasPrivilegedToken( iObject ) || currentUserIsAdmin() ) return true; else if ( isSystemType( (Class<? extends IObject>) iObject.getClass())) { return false; } // previou... | 3,228,413 |
private boolean allowUpdateOrDelete(IObject iObject, Details trustedDetails) { Assert.notNull(iObject); // needs no details info if ( hasPrivilegedToken( iObject ) || currentUserIsAdmin() ) return true; else if ( isSystemType( (Class<? extends IObject>) iObject.getClass())) { return false; } // previou... | private boolean allowUpdateOrDelete(IObject iObject, Details trustedDetails) { Assert.notNull(iObject); // needs no details info if ( hasPrivilegedToken( iObject ) || currentUserIsAdmin() ) return true; else if ( isSystemType( (Class<? extends IObject>) iObject.getClass())) { return false; } // previou... | 3,228,414 |
private boolean allowUpdateOrDelete(IObject iObject, Details trustedDetails) { Assert.notNull(iObject); // needs no details info if ( hasPrivilegedToken( iObject ) || currentUserIsAdmin() ) return true; else if ( isSystemType( (Class<? extends IObject>) iObject.getClass())) { return false; } // previou... | private boolean allowUpdateOrDelete(IObject iObject, Details trustedDetails) { Assert.notNull(iObject); // needs no details info if ( hasPrivilegedToken( iObject ) || currentUserIsAdmin() ) return true; else if ( isSystemType( (Class<? extends IObject>) iObject.getClass())) { return false; } // previou... | 3,228,415 |
private boolean allowUpdateOrDelete(IObject iObject, Details trustedDetails) { Assert.notNull(iObject); // needs no details info if ( hasPrivilegedToken( iObject ) || currentUserIsAdmin() ) return true; else if ( isSystemType( (Class<? extends IObject>) iObject.getClass())) { return false; } // previou... | private boolean allowUpdateOrDelete(IObject iObject, Details trustedDetails) { Assert.notNull(iObject); // needs no details info if ( hasPrivilegedToken( iObject ) || currentUserIsAdmin() ) return true; else if ( isSystemType( (Class<? extends IObject>) iObject.getClass())) { return false; } // previou... | 3,228,416 |
private boolean allowUpdateOrDelete(IObject iObject, Details trustedDetails) { Assert.notNull(iObject); // needs no details info if ( hasPrivilegedToken( iObject ) || currentUserIsAdmin() ) return true; else if ( isSystemType( (Class<? extends IObject>) iObject.getClass())) { return false; } // previou... | private boolean allowUpdateOrDelete(IObject iObject, Details trustedDetails) { Assert.notNull(iObject); // needs no details info if ( hasPrivilegedToken( iObject ) || currentUserIsAdmin() ) return true; else if ( isSystemType( (Class<? extends IObject>) iObject.getClass())) { return false; } // previou... | 3,228,417 |
private boolean allowUpdateOrDelete(IObject iObject, Details trustedDetails) { Assert.notNull(iObject); // needs no details info if ( hasPrivilegedToken( iObject ) || currentUserIsAdmin() ) return true; else if ( isSystemType( (Class<? extends IObject>) iObject.getClass())) { return false; } // previou... | private boolean allowUpdateOrDelete(IObject iObject, Details trustedDetails) { Assert.notNull(iObject); // needs no details info if ( hasPrivilegedToken( iObject ) || currentUserIsAdmin() ) return true; else if ( isSystemType( (Class<? extends IObject>) iObject.getClass())) { return false; } // previou... | 3,228,418 |
private boolean allowUpdateOrDelete(IObject iObject, Details trustedDetails) { Assert.notNull(iObject); // needs no details info if ( hasPrivilegedToken( iObject ) || currentUserIsAdmin() ) return true; else if ( isSystemType( (Class<? extends IObject>) iObject.getClass())) { return false; } // previou... | private boolean allowUpdateOrDelete(IObject iObject, Details trustedDetails) { Assert.notNull(iObject); // needs no details info if ( hasPrivilegedToken( iObject ) || currentUserIsAdmin() ) return true; else if ( isSystemType( (Class<? extends IObject>) iObject.getClass())) { return false; } // previou... | 3,228,419 |
private boolean allowUpdateOrDelete(IObject iObject, Details trustedDetails) { Assert.notNull(iObject); // needs no details info if ( hasPrivilegedToken( iObject ) || currentUserIsAdmin() ) return true; else if ( isSystemType( (Class<? extends IObject>) iObject.getClass())) { return false; } // previou... | private boolean allowUpdateOrDelete(IObject iObject, Details trustedDetails) { Assert.notNull(iObject); // needs no details info if ( hasPrivilegedToken( iObject ) || currentUserIsAdmin() ) return true; else if ( isSystemType( (Class<? extends IObject>) iObject.getClass())) { return false; } // previou... | 3,228,420 |
private boolean allowUpdateOrDelete(IObject iObject, Details trustedDetails) { Assert.notNull(iObject); // needs no details info if ( hasPrivilegedToken( iObject ) || currentUserIsAdmin() ) return true; else if ( isSystemType( (Class<? extends IObject>) iObject.getClass())) { return false; } // previou... | private boolean allowUpdateOrDelete(IObject iObject, Details trustedDetails) { Assert.notNull(iObject); // needs no details info if ( hasPrivilegedToken( iObject ) || currentUserIsAdmin() ) return true; else if ( isSystemType( (Class<? extends IObject>) iObject.getClass())) { return false; } // previou... | 3,228,421 |
private boolean allowUpdateOrDelete(IObject iObject, Details trustedDetails) { Assert.notNull(iObject); // needs no details info if ( hasPrivilegedToken( iObject ) || currentUserIsAdmin() ) return true; else if ( isSystemType( (Class<? extends IObject>) iObject.getClass())) { return false; } // previou... | private boolean allowUpdateOrDelete(IObject iObject, Details trustedDetails) { Assert.notNull(iObject); // needs no details info if ( hasPrivilegedToken( iObject ) || currentUserIsAdmin() ) return true; else if ( isSystemType( (Class<? extends IObject>) iObject.getClass())) { return false; } // previou... | 3,228,422 |
private boolean allowUpdateOrDelete(IObject iObject, Details trustedDetails) { Assert.notNull(iObject); // needs no details info if ( hasPrivilegedToken( iObject ) || currentUserIsAdmin() ) return true; else if ( isSystemType( (Class<? extends IObject>) iObject.getClass())) { return false; } // previou... | private boolean allowUpdateOrDelete(IObject iObject, Details trustedDetails) { Assert.notNull(iObject); // needs no details info if ( hasPrivilegedToken( iObject ) || currentUserIsAdmin() ) return true; else if ( isSystemType( (Class<? extends IObject>) iObject.getClass())) { return false; } // previou... | 3,228,423 |
void applyUmaskIfNecessary( Details d ) { Permissions p = d.getPermissions(); if ( p.isSet( Flag.SOFT) ) { if ( ec.getPrincipal().hasUmask() ) { p.grantAll( ec.getPrincipal().getUmask() ); p.revokeAll( ec.getPrincipal().getUmask() ); } // don't store it in the DB.... | void applyUmaskIfNecessary( Details d ) { Permissions p = d.getPermissions(); if ( p.isSet( Flag.SOFT) ) { if ( ec.getPrincipal().hasUmask() ) { p.grantAll( ec.getPrincipal().getUmask() ); p.revokeAll( ec.getPrincipal().getUmask() ); } // don't store it in the DB.... | 3,228,424 |
protected void checkReady(String method) { if (!isReady()) { throw new ApiUsageException("The security system is not ready.\n" + "Cannot execute: "+method); } } | protected void checkReady(String method) { if (!isReady()) { throw new ApiUsageException("The security system is not ready.\n" + "Cannot execute: "+method); } } | 3,228,425 |
protected void checkReady(String method) { if (!isReady()) { throw new ApiUsageException("The security system is not ready.\n" + "Cannot execute: "+method); } } | protected void checkReady(String method) { if (!isReady()) { throw new ApiUsageException("The security system is not ready.\n" + "Cannot execute: "+method); } } | 3,228,426 |
public void clearCurrentDetails() { CurrentDetails.clear(); } | public void clearCurrentDetails() { CurrentDetails.clear(); } | 3,228,427 |
boolean copyNonNullPermissions( Details target, Permissions p ) { if (p != null ) { target.setPermissions( p ); return true; } return false; } | boolean copyNonNullPermissions( Details target, Permissions p ) { if (p != null ) { target.setPermissions( p ); return true; } return false; } | 3,228,428 |
public void copyToken(IObject source, IObject copy) { if ( source == null || copy == null || source == copy) return; GraphHolder gh1 = source.getGraphHolder(); GraphHolder gh2 = copy.getGraphHolder(); // try our token first if ( gh1.tokenMatches(token)) { gh2.setToken(token,token); } else // now ... | public void copyToken(IObject source, IObject copy) { if ( source == null || copy == null || source == copy) return; GraphHolder gh1 = source.getGraphHolder(); GraphHolder gh2 = copy.getGraphHolder(); // try our token first if ( gh1.tokenMatches(token)) { gh2.setToken(token,token); } else // now ... | 3,228,429 |
public void copyToken(IObject source, IObject copy) { if ( source == null || copy == null || source == copy) return; GraphHolder gh1 = source.getGraphHolder(); GraphHolder gh2 = copy.getGraphHolder(); // try our token first if ( gh1.tokenMatches(token)) { gh2.setToken(token,token); } else // now ... | public void copyToken(IObject source, IObject copy) { if ( source == null || copy == null || source == copy) return; GraphHolder gh1 = source.getGraphHolder(); GraphHolder gh2 = copy.getGraphHolder(); // try our token first if ( gh1.tokenMatches(token)) { gh2.setToken(token,token); } else // now ... | 3,228,430 |
public void copyToken(IObject source, IObject copy) { if ( source == null || copy == null || source == copy) return; GraphHolder gh1 = source.getGraphHolder(); GraphHolder gh2 = copy.getGraphHolder(); // try our token first if ( gh1.tokenMatches(token)) { gh2.setToken(token,token); } else // now ... | public void copyToken(IObject source, IObject copy) { if ( source == null || copy == null || source == copy) return; GraphHolder gh1 = source.getGraphHolder(); GraphHolder gh2 = copy.getGraphHolder(); // try our token first if ( gh1.tokenMatches(token)) { gh2.setToken(token,token); } else // now ... | 3,228,431 |
public void copyToken(IObject source, IObject copy) { if ( source == null || copy == null || source == copy) return; GraphHolder gh1 = source.getGraphHolder(); GraphHolder gh2 = copy.getGraphHolder(); // try our token first if ( gh1.tokenMatches(token)) { gh2.setToken(token,token); } else // now ... | public void copyToken(IObject source, IObject copy) { if ( source == null || copy == null || source == copy) return; GraphHolder gh1 = source.getGraphHolder(); GraphHolder gh2 = copy.getGraphHolder(); // try our token first if ( gh1.tokenMatches(token)) { gh2.setToken(token,token); } else // now ... | 3,228,432 |
public void copyToken(IObject source, IObject copy) { if ( source == null || copy == null || source == copy) return; GraphHolder gh1 = source.getGraphHolder(); GraphHolder gh2 = copy.getGraphHolder(); // try our token first if ( gh1.tokenMatches(token)) { gh2.setToken(token,token); } else // now ... | public void copyToken(IObject source, IObject copy) { if ( source == null || copy == null || source == copy) return; GraphHolder gh1 = source.getGraphHolder(); GraphHolder gh2 = copy.getGraphHolder(); // try our token first if ( gh1.tokenMatches(token)) { gh2.setToken(token,token); } else // now ... | 3,228,433 |
public void copyToken(IObject source, IObject copy) { if ( source == null || copy == null || source == copy) return; GraphHolder gh1 = source.getGraphHolder(); GraphHolder gh2 = copy.getGraphHolder(); // try our token first if ( gh1.tokenMatches(token)) { gh2.setToken(token,token); } else // now ... | public void copyToken(IObject source, IObject copy) { if ( source == null || copy == null || source == copy) return; GraphHolder gh1 = source.getGraphHolder(); GraphHolder gh2 = copy.getGraphHolder(); // try our token first if ( gh1.tokenMatches(token)) { gh2.setToken(token,token); } else // now ... | 3,228,434 |
public Event currentEvent() { checkReady("currentEvent"); return CurrentDetails.getCreationEvent(); } | public Event currentEvent() { checkReady("currentEvent"); return CurrentDetails.getCreationEvent(); } | 3,228,435 |
public ExperimenterGroup currentGroup() { checkReady("currentGroup"); return CurrentDetails.getGroup(); } | public ExperimenterGroup currentGroup() { checkReady("currentGroup"); return CurrentDetails.getGroup(); } | 3,228,436 |
public Long currentGroupId() { checkReady("currentGroupId"); return CurrentDetails.getGroup().getId(); } | public Long currentGroupId() { checkReady("currentGroupId"); return CurrentDetails.getGroup().getId(); } | 3,228,437 |
public Experimenter currentUser() { checkReady("currentUser"); return CurrentDetails.getOwner(); } | public Experimenter currentUser() { checkReady("currentUser"); return CurrentDetails.getOwner(); } | 3,228,438 |
public Long currentUserId() { checkReady("currentUserId"); return CurrentDetails.getOwner().getId(); } | public Long currentUserId() { checkReady("currentUserId"); return CurrentDetails.getOwner().getId(); } | 3,228,439 |
public boolean currentUserIsAdmin() { checkReady("currentUserIsAdmin"); return CurrentDetails.isAdmin(); } | public boolean currentUserIsAdmin() { checkReady("currentUserIsAdmin"); return CurrentDetails.isAdmin(); } | 3,228,440 |
public void disable(String...ids) { if (ids==null || ids.length==0) throw new ApiUsageException("Ids should not be empty."); CurrentDetails.addAllDisabled(ids); } | public void disable(String...ids) { if (ids==null || ids.length==0) throw new ApiUsageException("Ids should not be empty."); CurrentDetails.addAllDisabled(ids); } | 3,228,441 |
public void disableReadFilter( Object session ) { checkReady("disableReadFilter"); Session sess = (Session) session; sess.disableFilter(SecurityFilter.filterName); } | public void disableReadFilter( Object session ) { checkReady("disableReadFilter"); Session sess = (Session) session; sess.disableFilter(SecurityFilter.filterName); } | 3,228,442 |
public void disableReadFilter( Object session ) { checkReady("disableReadFilter"); Session sess = (Session) session; sess.disableFilter(SecurityFilter.filterName); } | public void disableReadFilter( Object session ) { checkReady("disableReadFilter"); Session sess = (Session) session; sess.disableFilter(SecurityFilter.filterName); } | 3,228,443 |
public <T extends IObject> T doAction(T obj, SecureAction action) { Assert.notNull(obj); Assert.notNull(action);// FIXME// Token oneTimeToken = new Token();// oneTimeTokens.put(oneTimeToken); obj.getGraphHolder().setToken(token,token);//oneTimeToken); T retVal; try { retVal = action.updateObject(obj); }... | public <T extends IObject> T doAction(T obj, SecureAction action) { Assert.notNull(obj); Assert.notNull(action);// FIXME// Token oneTimeToken = new Token();// oneTimeTokens.put(oneTimeToken); obj.getGraphHolder().setToken(token,token);//oneTimeToken); T retVal; try { retVal = action.updateObject(obj); }... | 3,228,444 |
public <T extends IObject> T doAction(T obj, SecureAction action) { Assert.notNull(obj); Assert.notNull(action);// FIXME// Token oneTimeToken = new Token();// oneTimeTokens.put(oneTimeToken); obj.getGraphHolder().setToken(token,token);//oneTimeToken); T retVal; try { retVal = action.updateObject(obj); }... | public <T extends IObject> T doAction(T obj, SecureAction action) { Assert.notNull(obj); Assert.notNull(action);// FIXME// Token oneTimeToken = new Token();// oneTimeTokens.put(oneTimeToken); obj.getGraphHolder().setToken(token,token);//oneTimeToken); T retVal; try { retVal = action.updateObject(obj); }... | 3,228,445 |
public <T extends IObject> T doAction(T obj, SecureAction action) { Assert.notNull(obj); Assert.notNull(action);// FIXME// Token oneTimeToken = new Token();// oneTimeTokens.put(oneTimeToken); obj.getGraphHolder().setToken(token,token);//oneTimeToken); T retVal; try { retVal = action.updateObject(obj); }... | public <T extends IObject> T doAction(T obj, SecureAction action) { Assert.notNull(obj); Assert.notNull(action);// FIXME// Token oneTimeToken = new Token();// oneTimeTokens.put(oneTimeToken); obj.getGraphHolder().setToken(token,token);//oneTimeToken); T retVal; try { retVal = action.updateObject(obj); }... | 3,228,446 |
public boolean emptyDetails( ) { return CurrentDetails.getOwner() == null && CurrentDetails.getGroup() == null && CurrentDetails.getCreationEvent() == null; } | public boolean emptyDetails( ) { return CurrentDetails.getOwner() == null && CurrentDetails.getGroup() == null && CurrentDetails.getCreationEvent() == null; } | 3,228,447 |
public void enable(String... ids) { if (ids==null || ids.length==0 ) CurrentDetails.clearDisabled(); CurrentDetails.removeAllDisabled(ids); } | public void enable(String... ids) { if (ids==null || ids.length==0 ) CurrentDetails.clearDisabled(); CurrentDetails.removeAllDisabled(ids); } | 3,228,448 |
public void enableReadFilter( Object session ) { if ( session == null || ! (session instanceof Session) ) { throw new ApiUsageException("The Object argument to enableReadFilter" + " in the BasicSystemSecurity implementation must be a " + " non-null org.hibernate.Session."); } checkReady("enableReadFil... | public void enableReadFilter( Object session ) { if ( session == null || ! (session instanceof Session) ) { throw new ApiUsageException("The Object argument to enableReadFilter" + " in the BasicSystemSecurity implementation must be a " + " non-null org.hibernate.Session."); } checkReady("enableReadFil... | 3,228,449 |
public void enableReadFilter( Object session ) { if ( session == null || ! (session instanceof Session) ) { throw new ApiUsageException("The Object argument to enableReadFilter" + " in the BasicSystemSecurity implementation must be a " + " non-null org.hibernate.Session."); } checkReady("enableReadFil... | public void enableReadFilter( Object session ) { if ( session == null || ! (session instanceof Session) ) { throw new ApiUsageException("The Object argument to enableReadFilter" + " in the BasicSystemSecurity implementation must be a " + " non-null org.hibernate.Session."); } checkReady("enableReadFil... | 3,228,450 |
public void enableReadFilter( Object session ) { if ( session == null || ! (session instanceof Session) ) { throw new ApiUsageException("The Object argument to enableReadFilter" + " in the BasicSystemSecurity implementation must be a " + " non-null org.hibernate.Session."); } checkReady("enableReadFil... | public void enableReadFilter( Object session ) { if ( session == null || ! (session instanceof Session) ) { throw new ApiUsageException("The Object argument to enableReadFilter" + " in the BasicSystemSecurity implementation must be a " + " non-null org.hibernate.Session."... | 3,228,451 |
public void enableReadFilter( Object session ) { if ( session == null || ! (session instanceof Session) ) { throw new ApiUsageException("The Object argument to enableReadFilter" + " in the BasicSystemSecurity implementation must be a " + " non-null org.hibernate.Session."); } checkReady("enableReadFil... | public void enableReadFilter( Object session ) { if ( session == null || ! (session instanceof Session) ) { throw new ApiUsageException("The Object argument to enableReadFilter" + " in the BasicSystemSecurity implementation must be a " + " non-null org.hibernate.Session."); } checkReady("enableReadFil... | 3,228,452 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.