rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k | meta stringlengths 141 403 |
|---|---|---|---|
if ( trustedDetails != null && trustedDetails.getPermissions().isSet( Flag.LOCKED ) ) s.add( iObject ); IObject[] candidates = em.getLockCandidates( iObject ); for (IObject object : candidates) { | IObject[] candidates = em.getLockCandidates(iObject); for (IObject object : candidates) { | public void markLockedIfNecessary( IObject iObject, Details trustedDetails ) { if ( iObject == null ) return; Set<IObject> s = new HashSet<IObject>(); if ( trustedDetails != null && trustedDetails.getPermissions().isSet( Flag.LOCKED ) ) s.add( iObject ); IObject[] candidates = em.getLockCandidates( iObject... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9c53370b3f7a88f29e38673527398c205d19f7d6/BasicSecuritySystem.java/buggy/components/server/src/ome/security/BasicSecuritySystem.java |
CurrentDetails.appendLockCandidates( s ); | CurrentDetails.appendLockCandidates(s); | public void markLockedIfNecessary( IObject iObject, Details trustedDetails ) { if ( iObject == null ) return; Set<IObject> s = new HashSet<IObject>(); if ( trustedDetails != null && trustedDetails.getPermissions().isSet( Flag.LOCKED ) ) s.add( iObject ); IObject[] candidates = em.getLockCandidates( iObject... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9c53370b3f7a88f29e38673527398c205d19f7d6/BasicSecuritySystem.java/buggy/components/server/src/ome/security/BasicSecuritySystem.java |
public Collection<Long> memberOfGroups() { | public Collection<Long> memberOfGroups() { | public Collection<Long> memberOfGroups() { checkReady("memberOfGroups"); return CurrentDetails.getMemberOfGroups(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9c53370b3f7a88f29e38673527398c205d19f7d6/BasicSecuritySystem.java/buggy/components/server/src/ome/security/BasicSecuritySystem.java |
public void newEvent( EventType type ) { CurrentDetails.newEvent( type, token ); | public void newEvent(EventType type) { CurrentDetails.newEvent(type, token); | public void newEvent( EventType type ) { CurrentDetails.newEvent( type, token ); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9c53370b3f7a88f29e38673527398c205d19f7d6/BasicSecuritySystem.java/buggy/components/server/src/ome/security/BasicSecuritySystem.java |
public void runAsAdmin( AdminAction action ) { | public void runAsAdmin(AdminAction action) { | public void runAsAdmin( AdminAction action ) { Assert.notNull(action); CurrentDetails.setAdmin(true); try { action.runAsAdmin(); } finally { CurrentDetails.setAdmin(false); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9c53370b3f7a88f29e38673527398c205d19f7d6/BasicSecuritySystem.java/buggy/components/server/src/ome/security/BasicSecuritySystem.java |
try { | try { | public void runAsAdmin( AdminAction action ) { Assert.notNull(action); CurrentDetails.setAdmin(true); try { action.runAsAdmin(); } finally { CurrentDetails.setAdmin(false); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9c53370b3f7a88f29e38673527398c205d19f7d6/BasicSecuritySystem.java/buggy/components/server/src/ome/security/BasicSecuritySystem.java |
public void setCurrentDetails() { | public void setCurrentDetails() { | public void setCurrentDetails() { LocalAdmin localAdmin = (LocalAdmin) sf.getAdminService(); ITypes iTypes = sf.getTypesService(); IUpdate iUpdate = sf.getUpdateService(); clearCurrentDetails(); if ( ec == null ) throw new InternalException( "EventContext is null in Event... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9c53370b3f7a88f29e38673527398c205d19f7d6/BasicSecuritySystem.java/buggy/components/server/src/ome/security/BasicSecuritySystem.java |
public void setCurrentDetails() { LocalAdmin localAdmin = (LocalAdmin) sf.getAdminService(); ITypes iTypes = sf.getTypesService(); IUpdate iUpdate = sf.getUpdateService(); clearCurrentDetails(); if ( ec == null ) throw new InternalException( "EventContext is null in Event... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9c53370b3f7a88f29e38673527398c205d19f7d6/BasicSecuritySystem.java/buggy/components/server/src/ome/security/BasicSecuritySystem.java | ||
if ( ec == null ) throw new InternalException( "EventContext is null in EventContext. Invalid configuration." ); if ( ec.getPrincipal() == null ) throw new InternalException( "Principal is null in EventContext. Security system failure." ); if (ec.getPrincipal().getName() == null) throw new InternalException( "Princip... | if (ec == null) throw new InternalException( "EventContext is null in EventContext. Invalid configuration."); | public void setCurrentDetails() { LocalAdmin localAdmin = (LocalAdmin) sf.getAdminService(); ITypes iTypes = sf.getTypesService(); IUpdate iUpdate = sf.getUpdateService(); clearCurrentDetails(); if ( ec == null ) throw new InternalException( "EventContext is null in Event... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9c53370b3f7a88f29e38673527398c205d19f7d6/BasicSecuritySystem.java/buggy/components/server/src/ome/security/BasicSecuritySystem.java |
final Principal p = ec.getPrincipal(); final Experimenter exp = localAdmin.lookupExperimenter(p.getName()); exp.getGraphHolder().setToken(token, token); CurrentDetails.setOwner(exp); List<Long> memberOfGroupsIds = exp.eachLinkedExperimenterGroup(new IdBlock()); CurrentDetails.setMemberOfGroups(memberOfGroupsIds); ... | if (ec.getPrincipal() == null) throw new InternalException( "Principal is null in EventContext. Security system failure."); | public void setCurrentDetails() { LocalAdmin localAdmin = (LocalAdmin) sf.getAdminService(); ITypes iTypes = sf.getTypesService(); IUpdate iUpdate = sf.getUpdateService(); clearCurrentDetails(); if ( ec == null ) throw new InternalException( "EventContext is null in Event... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9c53370b3f7a88f29e38673527398c205d19f7d6/BasicSecuritySystem.java/buggy/components/server/src/ome/security/BasicSecuritySystem.java |
ExperimenterGroup grp = localAdmin.groupProxy(p.getGroup()); grp.getGraphHolder().setToken(token, token); CurrentDetails.setGroup(grp); | if (ec.getPrincipal().getName() == null) throw new InternalException( "Principal.name is null in EventContext. Security system failure."); | public void setCurrentDetails() { LocalAdmin localAdmin = (LocalAdmin) sf.getAdminService(); ITypes iTypes = sf.getTypesService(); IUpdate iUpdate = sf.getUpdateService(); clearCurrentDetails(); if ( ec == null ) throw new InternalException( "EventContext is null in Event... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9c53370b3f7a88f29e38673527398c205d19f7d6/BasicSecuritySystem.java/buggy/components/server/src/ome/security/BasicSecuritySystem.java |
if (isSystemGroup(grp)) { CurrentDetails.setAdmin(true); } if (p.getEventType() == null) throw new InternalException( "Principal.eventType is null in EventContext. Security system failure."); | final Principal p = ec.getPrincipal(); | public void setCurrentDetails() { LocalAdmin localAdmin = (LocalAdmin) sf.getAdminService(); ITypes iTypes = sf.getTypesService(); IUpdate iUpdate = sf.getUpdateService(); clearCurrentDetails(); if ( ec == null ) throw new InternalException( "EventContext is null in Event... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9c53370b3f7a88f29e38673527398c205d19f7d6/BasicSecuritySystem.java/buggy/components/server/src/ome/security/BasicSecuritySystem.java |
EventType type = iTypes.getEnumeration(EventType.class,p.getEventType()); type.getGraphHolder().setToken(token, token); CurrentDetails.newEvent(type,token); Event event = getCurrentEvent(); event.getGraphHolder().setToken(token, token); try { setCurrentEvent(iUpdate.saveAndReturnObject(event)); } catch (InvalidDataAcc... | public void setCurrentDetails() { LocalAdmin localAdmin = (LocalAdmin) sf.getAdminService(); ITypes iTypes = sf.getTypesService(); IUpdate iUpdate = sf.getUpdateService(); clearCurrentDetails(); if ( ec == null ) throw new InternalException( "EventContext is null in Event... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9c53370b3f7a88f29e38673527398c205d19f7d6/BasicSecuritySystem.java/buggy/components/server/src/ome/security/BasicSecuritySystem.java | |
} | final Experimenter exp = localAdmin.lookupExperimenter(p.getName()); exp.getGraphHolder().setToken(token, token); CurrentDetails.setOwner(exp); List<Long> memberOfGroupsIds = exp .eachLinkedExperimenterGroup(new IdBlock()); CurrentDetails.setMemberOfGroups(memberOfGroupsIds); List<Long> leaderOfGroupsIds = localAdm... | public void setCurrentDetails() { LocalAdmin localAdmin = (LocalAdmin) sf.getAdminService(); ITypes iTypes = sf.getTypesService(); IUpdate iUpdate = sf.getUpdateService(); clearCurrentDetails(); if ( ec == null ) throw new InternalException( "EventContext is null in Event... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9c53370b3f7a88f29e38673527398c205d19f7d6/BasicSecuritySystem.java/buggy/components/server/src/ome/security/BasicSecuritySystem.java |
public void setCurrentEvent( Event event ) { CurrentDetails.setCreationEvent( event ); | public void setCurrentEvent(Event event) { CurrentDetails.setCreationEvent(event); | public void setCurrentEvent( Event event ) { CurrentDetails.setCreationEvent( event ); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9c53370b3f7a88f29e38673527398c205d19f7d6/BasicSecuritySystem.java/buggy/components/server/src/ome/security/BasicSecuritySystem.java |
public final void setExtendedMetadata( ExtendedMetadata metadata ) { if ( this.em != null ) throw new InternalException( "Cannot reset metadata." ); | public final void setExtendedMetadata(ExtendedMetadata metadata) { if (this.em != null) throw new InternalException("Cannot reset metadata."); | public final void setExtendedMetadata( ExtendedMetadata metadata ) { if ( this.em != null ) throw new InternalException( "Cannot reset metadata." ); this.em = metadata; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9c53370b3f7a88f29e38673527398c205d19f7d6/BasicSecuritySystem.java/buggy/components/server/src/ome/security/BasicSecuritySystem.java |
public void throwCreationViolation( IObject iObject ) throws SecurityViolation { | public void throwCreationViolation(IObject iObject) throws SecurityViolation { | public void throwCreationViolation( IObject iObject ) throws SecurityViolation { Assert.notNull(iObject); throw new SecurityViolation( iObject.getClass().getName() +" is a System-type, and may only be " +"created through privileged APIs."); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9c53370b3f7a88f29e38673527398c205d19f7d6/BasicSecuritySystem.java/buggy/components/server/src/ome/security/BasicSecuritySystem.java |
throw new SecurityViolation( iObject.getClass().getName() +" is a System-type, and may only be " +"created through privileged APIs."); | throw new SecurityViolation(iObject.getClass().getName() + " is a System-type, and may only be " + "created through privileged APIs."); | public void throwCreationViolation( IObject iObject ) throws SecurityViolation { Assert.notNull(iObject); throw new SecurityViolation( iObject.getClass().getName() +" is a System-type, and may only be " +"created through privileged APIs."); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9c53370b3f7a88f29e38673527398c205d19f7d6/BasicSecuritySystem.java/buggy/components/server/src/ome/security/BasicSecuritySystem.java |
public void throwDeleteViolation( IObject iObject ) throws SecurityViolation { | public void throwDeleteViolation(IObject iObject) throws SecurityViolation { | public void throwDeleteViolation( IObject iObject ) throws SecurityViolation { Assert.notNull(iObject); throw new SecurityViolation( "Deleting "+iObject+" not allowed." ); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9c53370b3f7a88f29e38673527398c205d19f7d6/BasicSecuritySystem.java/buggy/components/server/src/ome/security/BasicSecuritySystem.java |
throw new SecurityViolation( "Deleting "+iObject+" not allowed." ); | throw new SecurityViolation("Deleting " + iObject + " not allowed."); | public void throwDeleteViolation( IObject iObject ) throws SecurityViolation { Assert.notNull(iObject); throw new SecurityViolation( "Deleting "+iObject+" not allowed." ); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9c53370b3f7a88f29e38673527398c205d19f7d6/BasicSecuritySystem.java/buggy/components/server/src/ome/security/BasicSecuritySystem.java |
public void throwLoadViolation( IObject iObject ) throws SecurityViolation { | public void throwLoadViolation(IObject iObject) throws SecurityViolation { | public void throwLoadViolation( IObject iObject ) throws SecurityViolation { Assert.notNull(iObject); throw new SecurityViolation( "Cannot read "+iObject.getClass().getName()); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9c53370b3f7a88f29e38673527398c205d19f7d6/BasicSecuritySystem.java/buggy/components/server/src/ome/security/BasicSecuritySystem.java |
throw new SecurityViolation( "Cannot read "+iObject.getClass().getName()); | throw new SecurityViolation("Cannot read " + iObject.getClass().getName()); | public void throwLoadViolation( IObject iObject ) throws SecurityViolation { Assert.notNull(iObject); throw new SecurityViolation( "Cannot read "+iObject.getClass().getName()); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9c53370b3f7a88f29e38673527398c205d19f7d6/BasicSecuritySystem.java/buggy/components/server/src/ome/security/BasicSecuritySystem.java |
public void throwUpdateViolation( IObject iObject ) throws SecurityViolation { | public void throwUpdateViolation(IObject iObject) throws SecurityViolation { | public void throwUpdateViolation( IObject iObject ) throws SecurityViolation { Assert.notNull(iObject); throw new SecurityViolation( "Updating "+iObject+" not allowed." ); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9c53370b3f7a88f29e38673527398c205d19f7d6/BasicSecuritySystem.java/buggy/components/server/src/ome/security/BasicSecuritySystem.java |
throw new SecurityViolation( "Updating "+iObject+" not allowed." ); | throw new SecurityViolation("Updating " + iObject + " not allowed."); | public void throwUpdateViolation( IObject iObject ) throws SecurityViolation { Assert.notNull(iObject); throw new SecurityViolation( "Updating "+iObject+" not allowed." ); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9c53370b3f7a88f29e38673527398c205d19f7d6/BasicSecuritySystem.java/buggy/components/server/src/ome/security/BasicSecuritySystem.java |
public Details transientDetails( IObject obj ) { checkReady("transientDetails"); if ( hasPrivilegedToken( obj ) ) return obj.getDetails(); Details source = obj.getDetails(); Details newDetails = CurrentDetails.createDetails(); | public Details transientDetails(IObject obj) { | public Details transientDetails( IObject obj ) { checkReady("transientDetails"); if ( hasPrivilegedToken( obj ) ) return obj.getDetails(); // EARLY EXIT Details source = obj.getDetails(); Details newDetails = CurrentDetails.createDetails(); if ( source != null ) ... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9c53370b3f7a88f29e38673527398c205d19f7d6/BasicSecuritySystem.java/buggy/components/server/src/ome/security/BasicSecuritySystem.java |
if ( source != null ) { | checkReady("transientDetails"); | public Details transientDetails( IObject obj ) { checkReady("transientDetails"); if ( hasPrivilegedToken( obj ) ) return obj.getDetails(); // EARLY EXIT Details source = obj.getDetails(); Details newDetails = CurrentDetails.createDetails(); if ( source != null ) ... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9c53370b3f7a88f29e38673527398c205d19f7d6/BasicSecuritySystem.java/buggy/components/server/src/ome/security/BasicSecuritySystem.java |
copyNonNullPermissions( newDetails, source.getPermissions() ); applyUmaskIfNecessary( newDetails ); if (source.getOwner() != null && ! source.getOwner().getId().equals( newDetails.getOwner().getId() )) { if ( currentUserIsAdmin() ) { newDetails.setOwner( source.getOwner() ); } else { throw new SecurityViolation(Stri... | if (hasPrivilegedToken(obj)) return obj.getDetails(); | public Details transientDetails( IObject obj ) { checkReady("transientDetails"); if ( hasPrivilegedToken( obj ) ) return obj.getDetails(); // EARLY EXIT Details source = obj.getDetails(); Details newDetails = CurrentDetails.createDetails(); if ( source != null ) ... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9c53370b3f7a88f29e38673527398c205d19f7d6/BasicSecuritySystem.java/buggy/components/server/src/ome/security/BasicSecuritySystem.java |
if (source.getGroup() != null && source.getGroup().getId() != null) { if (memberOfGroups().contains( source.getGroup().getId())) { newDetails.setGroup( source.getGroup() ); } else if ( currentUserIsAdmin() ) { newDetails.setGroup( source.getGroup() ); } else { throw new SecurityViolation(String.format( "You are n... | Details source = obj.getDetails(); Details newDetails = CurrentDetails.createDetails(); | public Details transientDetails( IObject obj ) { checkReady("transientDetails"); if ( hasPrivilegedToken( obj ) ) return obj.getDetails(); // EARLY EXIT Details source = obj.getDetails(); Details newDetails = CurrentDetails.createDetails(); if ( source != null ) ... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9c53370b3f7a88f29e38673527398c205d19f7d6/BasicSecuritySystem.java/buggy/components/server/src/ome/security/BasicSecuritySystem.java |
return newDetails; | if (source != null) { | public Details transientDetails( IObject obj ) { checkReady("transientDetails"); if ( hasPrivilegedToken( obj ) ) return obj.getDetails(); // EARLY EXIT Details source = obj.getDetails(); Details newDetails = CurrentDetails.createDetails(); if ( source != null ) ... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9c53370b3f7a88f29e38673527398c205d19f7d6/BasicSecuritySystem.java/buggy/components/server/src/ome/security/BasicSecuritySystem.java |
} | copyNonNullPermissions(newDetails, source.getPermissions()); applyUmaskIfNecessary(newDetails); if (source.getOwner() != null && !source.getOwner().getId().equals( newDetails.getOwner().getId())) { if (currentUserIsAdmin()) { newDetails.setOwner(source.getOwner()); } else { throw new SecurityViolation(String.format(... | public Details transientDetails( IObject obj ) { checkReady("transientDetails"); if ( hasPrivilegedToken( obj ) ) return obj.getDetails(); // EARLY EXIT Details source = obj.getDetails(); Details newDetails = CurrentDetails.createDetails(); if ( source != null ) ... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9c53370b3f7a88f29e38673527398c205d19f7d6/BasicSecuritySystem.java/buggy/components/server/src/ome/security/BasicSecuritySystem.java |
return isAdminHolder.get() == null ? false : isAdminHolder.get().booleanValue(); | return data.get().isAdmin; | public static boolean isAdmin( ) { return isAdminHolder.get() == null ? false : isAdminHolder.get().booleanValue(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/e6b7ac4062ce844e31078de77a00a7ab77e5e5d5/CurrentDetails.java/buggy/components/server/src/ome/security/CurrentDetails.java |
Set<String> s = disabledSubsystemsHolder.get( ); | Set<String> s = data.get().disabledSubsystems; | public static boolean addAllDisabled(String...ids) { Set<String> s = disabledSubsystemsHolder.get( ); if ( s == null ) { s = new HashSet<String>(); disabledSubsystemsHolder.set( s ); } if (ids != null ) { return Collections.addAll(s, ids); } return false; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/e6b7ac4062ce844e31078de77a00a7ab77e5e5d5/CurrentDetails.java/buggy/components/server/src/ome/security/CurrentDetails.java |
disabledSubsystemsHolder.set( s ); | data.get().disabledSubsystems = s; | public static boolean addAllDisabled(String...ids) { Set<String> s = disabledSubsystemsHolder.get( ); if ( s == null ) { s = new HashSet<String>(); disabledSubsystemsHolder.set( s ); } if (ids != null ) { return Collections.addAll(s, ids); } return false; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/e6b7ac4062ce844e31078de77a00a7ab77e5e5d5/CurrentDetails.java/buggy/components/server/src/ome/security/CurrentDetails.java |
disabledSubsystemsHolder.remove(); | data.get().disabledSubsystems = null; | public static void clearDisabled() { disabledSubsystemsHolder.remove(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/e6b7ac4062ce844e31078de77a00a7ab77e5e5d5/CurrentDetails.java/buggy/components/server/src/ome/security/CurrentDetails.java |
Set<String> s = disabledSubsystemsHolder.get( ); | Set<String> s = data.get().disabledSubsystems; | public static boolean removeAllDisabled(String...ids) { Set<String> s = disabledSubsystemsHolder.get( ); if ( s != null && ids != null ) { boolean changed = false; for (String string : ids) { changed |= s.remove(string); } } return false; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/e6b7ac4062ce844e31078de77a00a7ab77e5e5d5/CurrentDetails.java/buggy/components/server/src/ome/security/CurrentDetails.java |
Set<String> s = disabledSubsystemsHolder.get( ); | Set<String> s = data.get().disabledSubsystems; | public static boolean isDisabled(String id) { Set<String> s = disabledSubsystemsHolder.get( ); if ( s == null || id == null || ! s.contains(id)) return false; return true; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/e6b7ac4062ce844e31078de77a00a7ab77e5e5d5/CurrentDetails.java/buggy/components/server/src/ome/security/CurrentDetails.java |
Collection<Long> c = leaderOfGroupsHolder.get(); | Collection<Long> c = data.get().leaderOfGroups; | public static Collection<Long> getLeaderOfGroups( ) { Collection<Long> c = leaderOfGroupsHolder.get(); if ( c == null || c.size() == 0 ) { c = Collections.singletonList(Long.MIN_VALUE); // FIXME hack as well. } return c; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/e6b7ac4062ce844e31078de77a00a7ab77e5e5d5/CurrentDetails.java/buggy/components/server/src/ome/security/CurrentDetails.java |
Set<IObject> s = lockCandidatesHolder.get(); | Set<IObject> s = data.get().lockCandidates; | public static Set<IObject> getLockCandidates() { Set<IObject> s = lockCandidatesHolder.get(); if ( s == null ) return new HashSet<IObject>(); return s; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/e6b7ac4062ce844e31078de77a00a7ab77e5e5d5/CurrentDetails.java/buggy/components/server/src/ome/security/CurrentDetails.java |
void markLockedIfNecessary( IObject iObject, Details trustedDetails ); | void markLockedIfNecessary( IObject iObject ); | void markLockedIfNecessary( IObject iObject, Details trustedDetails ); | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9c53370b3f7a88f29e38673527398c205d19f7d6/SecuritySystem.java/buggy/components/server/src/ome/security/SecuritySystem.java |
Holder h = classNameHolder.get( iObject.getClass().getName() ); return h.getLockCandidates( iObject ); | Locks l = locksHolder.get( iObject.getClass().getName() ); return l.getLockCandidates( iObject ); | public IObject[] getLockCandidates( IObject iObject ) { if ( iObject == null ) return new IObject[]{}; Holder h = classNameHolder.get( iObject.getClass().getName() ); return h.getLockCandidates( iObject ); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/e30f801c3b2923483e1f69853136328bb21a1d79/ExtendedMetadata.java/buggy/components/server/src/ome/tools/hibernate/ExtendedMetadata.java |
Set<IObject> s = lockCandidatesHolder.get(); | Set<IObject> s = data.get().lockCandidates; | public static void appendLockCandidates( Set<IObject> set ) { Set<IObject> s = lockCandidatesHolder.get(); if ( s == null ) { s = new HashSet<IObject>( ); lockCandidatesHolder.set( s ); } s.addAll( set ); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/e6b7ac4062ce844e31078de77a00a7ab77e5e5d5/CurrentDetails.java/buggy/components/server/src/ome/security/CurrentDetails.java |
lockCandidatesHolder.set( s ); | data.get().lockCandidates = s; | public static void appendLockCandidates( Set<IObject> set ) { Set<IObject> s = lockCandidatesHolder.get(); if ( s == null ) { s = new HashSet<IObject>( ); lockCandidatesHolder.set( s ); } s.addAll( set ); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/e6b7ac4062ce844e31078de77a00a7ab77e5e5d5/CurrentDetails.java/buggy/components/server/src/ome/security/CurrentDetails.java |
Collection<Long> c = memberOfGroupsHolder.get(); | Collection<Long> c = data.get().memberOfGroups; | public static Collection<Long> getMemberOfGroups( ) { Collection<Long> c = memberOfGroupsHolder.get(); if ( c == null || c.size() == 0 ) { c = Collections.singletonList(Long.MIN_VALUE); // FIXME hack as well. } return c; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/e6b7ac4062ce844e31078de77a00a7ab77e5e5d5/CurrentDetails.java/buggy/components/server/src/ome/security/CurrentDetails.java |
isAdminHolder.set( Boolean.valueOf(isAdmin)); | data.get().isAdmin = isAdmin; | public static void setAdmin( boolean isAdmin ) { isAdminHolder.set( Boolean.valueOf(isAdmin)); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/e6b7ac4062ce844e31078de77a00a7ab77e5e5d5/CurrentDetails.java/buggy/components/server/src/ome/security/CurrentDetails.java |
memberOfGroupsHolder.set( groupIds ); | data.get().memberOfGroups = groupIds; | public static void setMemberOfGroups( Collection<Long> groupIds ) { memberOfGroupsHolder.set( groupIds ); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/e6b7ac4062ce844e31078de77a00a7ab77e5e5d5/CurrentDetails.java/buggy/components/server/src/ome/security/CurrentDetails.java |
leaderOfGroupsHolder.set( groupIds ); | data.get().leaderOfGroups = groupIds; | public static void setLeaderOfGroups( Collection<Long> groupIds ) { leaderOfGroupsHolder.set( groupIds ); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/e6b7ac4062ce844e31078de77a00a7ab77e5e5d5/CurrentDetails.java/buggy/components/server/src/ome/security/CurrentDetails.java |
public void accept(TreeImageDisplayVisitor visitor, int algoType) | public void accept(TreeImageDisplayVisitor visitor) | public void accept(TreeImageDisplayVisitor visitor, int algoType) { if (visitor == null) throw new NullPointerException("No visitor."); if (!checkAlgoType(algoType)) throw new IllegalArgumentException("Algorithm not supported."); Iterator i = childrenDisplay.iterator(); ... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/146920a8791fff71320ced0f240b9d8f3d319a13/TreeImageDisplay.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/browser/TreeImageDisplay.java |
if (!checkAlgoType(algoType)) throw new IllegalArgumentException("Algorithm not supported."); Iterator i = childrenDisplay.iterator(); TreeImageDisplay child; switch (algoType) { case TreeImageDisplayVisitor.TREEIMAGE_NODE_ONLY: while (i.hasNext()) { child = (TreeImageDisplay) i.next(); child.accept(visitor, algoType)... | accept(visitor, TreeImageDisplayVisitor.ALL_NODES); | public void accept(TreeImageDisplayVisitor visitor, int algoType) { if (visitor == null) throw new NullPointerException("No visitor."); if (!checkAlgoType(algoType)) throw new IllegalArgumentException("Algorithm not supported."); Iterator i = childrenDisplay.iterator(); ... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/146920a8791fff71320ced0f240b9d8f3d319a13/TreeImageDisplay.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/browser/TreeImageDisplay.java |
data.setName(summary.getName()); tdm.getAttributeMap().putAttribute(pix); | public void run() { addLoaderThread(controller,this); int count = 1; int total = refList.size(); for(Iterator iter = refList.iterator(); (iter.hasNext() && !kill);) { ImageSummary summary... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ad867bc3f360d4a9ce481731c0723126b9112b54/BrowserAgent.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/BrowserAgent.java | |
if(heatMapManager != null) { manager.addSelectionListener(heatMapManager); } if(colorMapManager != null) { manager.addSelectionListener(colorMapManager); } | public void setBrowserManager(BrowserManager manager) { this.browserManager = manager; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/e83036080b3a8ade884eca150f3f3c2004b556c9/BrowserEnvironment.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/BrowserEnvironment.java | |
public void setActiveBrowser(BrowserController browser) | public void setActiveBrowser(UIWrapper browser) | public void setActiveBrowser(BrowserController browser) { synchronized(browserList) // will this lock? { int prevIndex = browserList.indexOf(browser)+1; browserList.add(0,browser); browserList.remove(prevIndex); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a74dcf148f6dd7ae6d4c17a9e0406afba262a755/BrowserManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/BrowserManager.java |
defaultActions.setMouseClickAction(PiccoloModifiers.NORMAL, to50Action); | to50Actions.setMouseClickAction(PiccoloModifiers.NORMAL, to50Action); | public static BPalette getZoomPalette(final BrowserModel backingModel, final BrowserTopModel model) { if(backingModel == null || model == null) { return null; } BPalette palette = new BPalette(model,"Zoom"); BIcon toFi... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9ad2d2709e2cdefc9a414f2e51f6a883a2403c7a/PaletteFactory.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/ui/PaletteFactory.java |
defaultActions.setMouseClickAction(PiccoloModifiers.NORMAL, | to75Actions.setMouseClickAction(PiccoloModifiers.NORMAL, | public static BPalette getZoomPalette(final BrowserModel backingModel, final BrowserTopModel model) { if(backingModel == null || model == null) { return null; } BPalette palette = new BPalette(model,"Zoom"); BIcon toFi... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9ad2d2709e2cdefc9a414f2e51f6a883a2403c7a/PaletteFactory.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/ui/PaletteFactory.java |
defaultActions.setMouseClickAction(PiccoloModifiers.NORMAL, | to100Actions.setMouseClickAction(PiccoloModifiers.NORMAL, | public static BPalette getZoomPalette(final BrowserModel backingModel, final BrowserTopModel model) { if(backingModel == null || model == null) { return null; } BPalette palette = new BPalette(model,"Zoom"); BIcon toFi... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9ad2d2709e2cdefc9a414f2e51f6a883a2403c7a/PaletteFactory.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/ui/PaletteFactory.java |
defaultActions.setMouseClickAction(PiccoloModifiers.NORMAL, | to200Actions.setMouseClickAction(PiccoloModifiers.NORMAL, | public static BPalette getZoomPalette(final BrowserModel backingModel, final BrowserTopModel model) { if(backingModel == null || model == null) { return null; } BPalette palette = new BPalette(model,"Zoom"); BIcon toFi... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9ad2d2709e2cdefc9a414f2e51f6a883a2403c7a/PaletteFactory.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/ui/PaletteFactory.java |
to50Icon.setMouseDownActions(to200Actions); | to200Icon.setMouseDownActions(to200Actions); | public static BPalette getZoomPalette(final BrowserModel backingModel, final BrowserTopModel model) { if(backingModel == null || model == null) { return null; } BPalette palette = new BPalette(model,"Zoom"); BIcon toFi... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9ad2d2709e2cdefc9a414f2e51f6a883a2403c7a/PaletteFactory.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/ui/PaletteFactory.java |
paletteStatusMap.put(palette,new Integer(PALETTE_HIDDEN)); | public void addPalette(String paletteName, BPalette palette) { if(paletteName == null || palette == null) { return; } paletteMap.put(paletteName,palette); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/913e45a73e803bf6a97dca24496a64546a51c9d5/BrowserTopModel.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/BrowserTopModel.java | |
public void addBrowser(BrowserController browser) | public void addBrowser(UIWrapper browser) | public void addBrowser(BrowserController browser) { if (browser != null) { browserList.add(0,browser); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a74dcf148f6dd7ae6d4c17a9e0406afba262a755/BrowserManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/BrowserManager.java |
public DatasetData retrieveDataset(int datasetID) | public DatasetData retrieveDataset(int datasetID, DatasetData retVal) | public DatasetData retrieveDataset(int datasetID) throws DSOutOfServiceException, DSAccessException; | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a43ad78503af4e7f39a04cb20cfba13e1c78b806/DataManagementService.java/buggy/SRC/org/openmicroscopy/shoola/env/data/DataManagementService.java |
public BrowserController getBrowser(int index) | public UIWrapper getBrowser(int index) | public BrowserController getBrowser(int index) { try { return (BrowserController) browserList.get(index); } catch (Exception e) { // TODO: log message here return null; } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a74dcf148f6dd7ae6d4c17a9e0406afba262a755/BrowserManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/BrowserManager.java |
return (BrowserController) browserList.get(index); | return (UIWrapper) browserList.get(index); | public BrowserController getBrowser(int index) { try { return (BrowserController) browserList.get(index); } catch (Exception e) { // TODO: log message here return null; } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a74dcf148f6dd7ae6d4c17a9e0406afba262a755/BrowserManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/BrowserManager.java |
message.replaceAll("%n",String.valueOf(stepsComplete)); message.replaceAll("%t",String.valueOf(totalSteps)); | message = message.replaceAll("%n",String.valueOf(stepsComplete)); message = message.replaceAll("%t",String.valueOf(totalSteps)); | public static String format(String message, int stepsComplete, int totalSteps) { message.replaceAll("%n",String.valueOf(stepsComplete)); message.replaceAll("%t",String.valueOf(totalSteps)); return message; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b430f8c6bd05687b350e025694f7e1b08ab0c3ff/ProgressMessageFormatter.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/datamodel/ProgressMessageFormatter.java |
if (file.isDirectory()) | if (isClass(file)) { addInstrumentationToSingleClass(file); } else if (file.isDirectory()) | private void addInstrumentation(File file) { if (file.isDirectory()) { File[] contents = file.listFiles(); for (int i = 0; i < contents.length; i++) addInstrumentation(contents[i]); return; } if (!isClass(file)) { return; } if (logger.isDebugEnabled()) { logger.debug("instrumenting " + file.getAbs... | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/6febec9638071e32d498b4bd4a149cb4872b0993/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/instrument/Main.java |
return; | private void addInstrumentation(File file) { if (file.isDirectory()) { File[] contents = file.listFiles(); for (int i = 0; i < contents.length; i++) addInstrumentation(contents[i]); return; } if (!isClass(file)) { return; } if (logger.isDebugEnabled()) { logger.debug("instrumenting " + file.getAbs... | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/6febec9638071e32d498b4bd4a149cb4872b0993/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/instrument/Main.java | |
if (!isClass(file)) | else if (isArchive(file)) | private void addInstrumentation(File file) { if (file.isDirectory()) { File[] contents = file.listFiles(); for (int i = 0; i < contents.length; i++) addInstrumentation(contents[i]); return; } if (!isClass(file)) { return; } if (logger.isDebugEnabled()) { logger.debug("instrumenting " + file.getAbs... | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/6febec9638071e32d498b4bd4a149cb4872b0993/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/instrument/Main.java |
return; } if (logger.isDebugEnabled()) { logger.debug("instrumenting " + file.getAbsolutePath()); } InputStream inputStream = null; ClassWriter cw; ClassInstrumenter cv; try { inputStream = new FileInputStream(file); ClassReader cr = new ClassReader(inputStream); cw = new ClassWriter(true); cv = new ClassInstrumenter... | addInstrumentationToArchive(file); | private void addInstrumentation(File file) { if (file.isDirectory()) { File[] contents = file.listFiles(); for (int i = 0; i < contents.length; i++) addInstrumentation(contents[i]); return; } if (!isClass(file)) { return; } if (logger.isDebugEnabled()) { logger.debug("instrumenting " + file.getAbs... | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/6febec9638071e32d498b4bd4a149cb4872b0993/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/instrument/Main.java |
System.out.println("Instrument time: " + (stopTime - startTime) + "ms"); | System.out.println("Instrument time: " + (stopTime - startTime) + "ms"); | public static void main(String[] args) { long startTime = System.currentTimeMillis(); Main main = new Main(); boolean hasCommandsFile = false; String commandsFileName = null; for (int i = 0; i < args.length; i++) { if (args[i].equals("--commandsfile")) { hasCommandsFile = true; commandsFileName = args[... | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/6febec9638071e32d498b4bd4a149cb4872b0993/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/instrument/Main.java |
Pattern ignoreRegexp) | final Collection ignoreRegexs) | public ClassInstrumenter(ProjectData projectData, final ClassVisitor cv, Pattern ignoreRegexp) { super(cv); this.projectData = projectData; this.ignoreRegex = ignoreRegexp; } | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/8d76b07e3d230fcd0d3b233e7ffc80df6ca3ec82/ClassInstrumenter.java/buggy/cobertura/src/net/sourceforge/cobertura/instrument/ClassInstrumenter.java |
this.ignoreRegex = ignoreRegexp; | this.ignoreRegexs = ignoreRegexs; | public ClassInstrumenter(ProjectData projectData, final ClassVisitor cv, Pattern ignoreRegexp) { super(cv); this.projectData = projectData; this.ignoreRegex = ignoreRegexp; } | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/8d76b07e3d230fcd0d3b233e7ffc80df6ca3ec82/ClassInstrumenter.java/buggy/cobertura/src/net/sourceforge/cobertura/instrument/ClassInstrumenter.java |
return defineClassUnder(name, superClass, objectClass); | return defineClassUnder(name, superClass, objectClass.getCRef()); | public RubyClass defineClass(String name, RubyClass superClass) { return defineClassUnder(name, superClass, objectClass); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/Ruby.java/buggy/src/org/jruby/Ruby.java |
public RubyClass defineClassUnder(String name, RubyClass superClass, RubyModule parentModule) { | public RubyClass defineClassUnder(String name, RubyClass superClass, SinglyLinkedList parentCRef) { | public RubyClass defineClassUnder(String name, RubyClass superClass, RubyModule parentModule) { if (superClass == null) { superClass = objectClass; } return superClass.newSubClass(name, parentModule); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/Ruby.java/buggy/src/org/jruby/Ruby.java |
return superClass.newSubClass(name, parentModule); | return superClass.newSubClass(name, parentCRef); | public RubyClass defineClassUnder(String name, RubyClass superClass, RubyModule parentModule) { if (superClass == null) { superClass = objectClass; } return superClass.newSubClass(name, parentModule); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/Ruby.java/buggy/src/org/jruby/Ruby.java |
return defineModuleUnder(name, objectClass); | return defineModuleUnder(name, objectClass.getCRef()); | public RubyModule defineModule(String name) { return defineModuleUnder(name, objectClass); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/Ruby.java/buggy/src/org/jruby/Ruby.java |
public RubyModule defineModuleUnder(String name, RubyModule parentModule) { RubyModule newModule = RubyModule.newModule(this, name, parentModule); | public RubyModule defineModuleUnder(String name, SinglyLinkedList parentCRef) { RubyModule newModule = RubyModule.newModule(this, name, parentCRef); | public RubyModule defineModuleUnder(String name, RubyModule parentModule) { RubyModule newModule = RubyModule.newModule(this, name, parentModule); parentModule.setConstant(name, newModule); return newModule; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/Ruby.java/buggy/src/org/jruby/Ruby.java |
parentModule.setConstant(name, newModule); | ((RubyModule)parentCRef.getValue()).setConstant(name, newModule); | public RubyModule defineModuleUnder(String name, RubyModule parentModule) { RubyModule newModule = RubyModule.newModule(this, name, parentModule); parentModule.setConstant(name, newModule); return newModule; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/Ruby.java/buggy/src/org/jruby/Ruby.java |
return (RubyModule) objectClass.getConstant(name, false); | return (RubyModule) objectClass.getConstantAt(name); | public RubyModule getModule(String name) { return (RubyModule) objectClass.getConstant(name, false); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/Ruby.java/buggy/src/org/jruby/Ruby.java |
RubyModule module = (RubyModule) getCurrentContext().getRubyClass().getConstant(name, false); | RubyModule module = (RubyModule) getCurrentContext().getRubyClass().getConstantAt(name); | public RubyModule getOrCreateModule(String name) { RubyModule module = (RubyModule) getCurrentContext().getRubyClass().getConstant(name, false); if (module == null) { module = (RubyModule) getCurrentContext().getRubyClass().setConstant(name, defineModule(name)); ... | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/Ruby.java/buggy/src/org/jruby/Ruby.java |
getObject().defineConstant("TOPLEVEL_BINDING", newBinding()); | private void init() { nilObject = new RubyNil(this); trueObject = new RubyBoolean(this, true); falseObject = new RubyBoolean(this, false); verbose = falseObject; javaSupport = new JavaSupport(this); initLibraries(); getCurrentContext().preInit... | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/Ruby.java/buggy/src/org/jruby/Ruby.java | |
RubyClass metaClass = objectClass.makeMetaClass(classClass, getCurrentContext().getRubyClass()); metaClass = moduleClass.makeMetaClass(metaClass, getCurrentContext().getRubyClass()); metaClass = classClass.makeMetaClass(metaClass, getCurrentContext().getRubyClass()); | RubyClass metaClass = objectClass.makeMetaClass(classClass, objectMetaClass.getCRef()); metaClass = moduleClass.makeMetaClass(metaClass, objectMetaClass.getCRef()); metaClass = classClass.makeMetaClass(metaClass, objectMetaClass.getCRef()); | private void initCoreClasses() { ObjectMetaClass objectMetaClass = new ObjectMetaClass(this); objectMetaClass.initializeClass(); objectClass = objectMetaClass; objectClass.setConstant("Object", objectClass); RubyClass moduleClass = new ModuleMetaClass(this, objectClass); ... | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/Ruby.java/buggy/src/org/jruby/Ruby.java |
new BindingMetaClass(this).initializeClass(); | private void initCoreClasses() { ObjectMetaClass objectMetaClass = new ObjectMetaClass(this); objectMetaClass.initializeClass(); objectClass = objectMetaClass; objectClass.setConstant("Object", objectClass); RubyClass moduleClass = new ModuleMetaClass(this, objectClass); ... | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/Ruby.java/buggy/src/org/jruby/Ruby.java | |
if (!wrap) { secure(4); /* should alter global state */ | try { if (!wrap) { secure(4); /* should alter global state */ context.preNodeEval(null, objectClass, self); } else { /* load in anonymous module as toplevel */ context.preNodeEval(RubyModule.newModule(this, null), context.getWrapper(), self); self = getTopSelf().rbClone(); self.extendObject(context.getRubyClass()); }... | public void loadNode(String scriptName, Node node, boolean wrap) { IRubyObject self = getTopSelf(); ThreadContext context = getCurrentContext(); RubyModule wrapper = context.getWrapper(); if (!wrap) { secure(4); /* should alter global state */ context.pr... | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/Ruby.java/buggy/src/org/jruby/Ruby.java |
context.preNodeEval(null, objectClass, self); } else { /* load in anonymous module as toplevel */ context.preNodeEval(RubyModule.newModule(this, null), context.getWrapper(), self); | /* default visibility is private at loading toplevel */ getCurrentContext().setCurrentVisibility(Visibility.PRIVATE); | public void loadNode(String scriptName, Node node, boolean wrap) { IRubyObject self = getTopSelf(); ThreadContext context = getCurrentContext(); RubyModule wrapper = context.getWrapper(); if (!wrap) { secure(4); /* should alter global state */ context.pr... | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/Ruby.java/buggy/src/org/jruby/Ruby.java |
self = getTopSelf().rbClone(); self.extendObject(context.getRubyClass()); } /* default visibility is private at loading toplevel */ getCurrentContext().setCurrentVisibility(Visibility.PRIVATE); try { | public void loadNode(String scriptName, Node node, boolean wrap) { IRubyObject self = getTopSelf(); ThreadContext context = getCurrentContext(); RubyModule wrapper = context.getWrapper(); if (!wrap) { secure(4); /* should alter global state */ context.pr... | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/Ruby.java/buggy/src/org/jruby/Ruby.java | |
super("Bignum", RubyBignum.class, runtime.getObject()); | super("Bignum", RubyBignum.class, runtime.getClass("Integer")); | public BignumMetaClass(Ruby runtime) { super("Bignum", RubyBignum.class, runtime.getObject()); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1136d8f3c5d8cb8b35bf7e5cdb843eaa91cd81c/BignumMetaClass.java/buggy/src/org/jruby/runtime/builtin/meta/BignumMetaClass.java |
return new GCDefinition(ruby).getModule(); | RubyModule result = ruby.defineModule("GC"); CallbackFactory callbackFactory = ruby.callbackFactory(); result.defineSingletonMethod("start", callbackFactory.getSingletonMethod(RubyGC.class, "start")); result.defineSingletonMethod("garbage_collect", callbackFactory.getSingletonMethod(RubyGC.class, "start")); return re... | public static RubyModule createGCModule(Ruby ruby) { return new GCDefinition(ruby).getModule(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1c602493a83e2050f401fa6925ec7e9269b45e4e/RubyGC.java/buggy/src/org/jruby/RubyGC.java |
process_status.defineMethod("==", process_statusCallbackFactory.getMethod("op_eq", IRubyObject.class)); | public static RubyModule createProcessModule(IRuby runtime) { RubyModule process = runtime.defineModule("Process"); RubyModule process_status = process.defineClassUnder("Status", runtime.getObject()); CallbackFactory processCallbackFactory = runtime.callbackFactory(RubyProcess.class); ... | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/16ddb479a8f0fcdf42d51532bc7de3f2d2d03f2b/RubyProcess.java/buggy/src/org/jruby/RubyProcess.java | |
mtime = runtime.newFixnum(file.lastModified()); | mtime = runtime.newTime(file.lastModified()); | protected RubyFileStat(IRuby runtime, JRubyFile file) { super(runtime, runtime.getClass("File").getClass("Stat")); if(!file.exists()) { throw runtime.newErrnoENOENTError("No such file or directory - " + file.getPath()); } // We cannot determine, so always return 4096 (better t... | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/7c9ec57d0ce44adc41c27cdfce89439cec7da0ed/RubyFileStat.java/buggy/src/org/jruby/RubyFileStat.java |
return 16; | PixelsType type = pixels.getPixelsType(); if (type.getValue().equals("int8") || type.getValue().equals("uint8")) { return 8; } else if (type.getValue().equals("int16") || type.getValue().equals("uint16")) { return 16; } else if (type.getValue().equals("int32") || type.getValue().equals("uint32") || type.getValue().equ... | int getBitDepth() { return 16; // FIXME pixels.getPixelsType(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/4190152881c7f58e1a3f87c9e6736e403a241c86/PixelBuffer.java/buggy/components/omeio-nio/src/ome/io/nio/PixelBuffer.java |
private boolean flatten(ArrayList ary) { boolean mod = false; for (int i = ary.size() - 1; i >= 0; i--) { if (ary.get(i) instanceof RubyArray) { ArrayList ary2 = ((RubyArray) ary.remove(i)).getList(); flatten(ary2); ary.addAll(i, ary2); mod = true; } } return mod; | private boolean flatten(ArrayList array) { return flatten(array, new IdentitySet()); | private boolean flatten(ArrayList ary) { boolean mod = false; for (int i = ary.size() - 1; i >= 0; i--) { if (ary.get(i) instanceof RubyArray) { ArrayList ary2 = ((RubyArray) ary.remove(i)).getList(); flatten(ary2); ary.addAll(i, ary2); ... | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/385e3f4e7eba5184dfea0a1e9d23b8ab7d46b1a5/RubyArray.java/buggy/org/jruby/RubyArray.java |
RubyArray ary = newArray(getRuntime(), list); | RubyArray ary = newArray(getRuntime(), new ArrayList(list)); | public IRubyObject rbClone() { RubyArray ary = newArray(getRuntime(), list); ary.setupClone(this); return ary; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/385e3f4e7eba5184dfea0a1e9d23b8ab7d46b1a5/RubyArray.java/buggy/org/jruby/RubyArray.java |
public static Callback getSelfMethod() { | public static Callback getSelfMethod(final int arity) { | public static Callback getSelfMethod() { return new Callback() { public RubyObject execute(RubyObject recv, RubyObject[] args, Ruby ruby) { return recv; } }; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/6076c5ab87d25a488469aa1a32f1d2c9c9e470b2/CallbackFactory.java/buggy/org/jruby/runtime/CallbackFactory.java |
public int getArity() { return arity; } | public static Callback getSelfMethod() { return new Callback() { public RubyObject execute(RubyObject recv, RubyObject[] args, Ruby ruby) { return recv; } }; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/6076c5ab87d25a488469aa1a32f1d2c9c9e470b2/CallbackFactory.java/buggy/org/jruby/runtime/CallbackFactory.java | |
RubyClass type = getInternalClass().isSingleton() ? | RubyClass type = getInternalClass().isSingleton() ? | public RubyClass getSingletonClass() { if (isNil()) { return getNilSingletonClass(); } RubyClass type = getInternalClass().isSingleton() ? getInternalClass() : makeMetaClass(getInternalClass()); type.setTaint(isTaint()); type.setFrozen(isFrozen()); re... | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/3db6c9249a0b029b0a43fa8b53b9d42de5c34174/RubyObject.java/buggy/org/jruby/RubyObject.java |
public IRubyObject yieldUnder(RubyModule under) { return under.executeUnder(new Callback() { public IRubyObject execute(IRubyObject self, IRubyObject[] args) { // if () { Block oldBlock = runtime.getBlockStack().getCurrent().cloneBlock(); /... | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/3db6c9249a0b029b0a43fa8b53b9d42de5c34174/RubyObject.java/buggy/org/jruby/RubyObject.java | ||
public IRubyObject execute(IRubyObject self, IRubyObject[] args) { // if () { Block oldBlock = runtime.getBlockStack().getCurrent().cloneBlock(); /* copy the block to avoid modifying global data. */ runtime.getBlockStack().getCurrent()... | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/3db6c9249a0b029b0a43fa8b53b9d42de5c34174/RubyObject.java/buggy/org/jruby/RubyObject.java | ||
String message = "Your connection was closed due to an error."; | String message = Res.getString("message.disconnected.error"); | public void connectionClosedOnError(final Exception ex) { SwingUtilities.invokeLater(new Runnable() { public void run() { Log.error("Connection closed on error.", ex); String message = "Your connection was closed due to an error."; if (ex instanceof XMP... | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/97917d876023996dcd3bd220e88b62b3f6dcb7fc/SessionManager.java/buggy/src/java/org/jivesoftware/spark/SessionManager.java |
message = "Your connection was closed due to the same user logging in from another location."; | message = Res.getString("message.disconnected.conflict.error"); | public void connectionClosedOnError(final Exception ex) { SwingUtilities.invokeLater(new Runnable() { public void run() { Log.error("Connection closed on error.", ex); String message = "Your connection was closed due to an error."; if (ex instanceof XMP... | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/97917d876023996dcd3bd220e88b62b3f6dcb7fc/SessionManager.java/buggy/src/java/org/jivesoftware/spark/SessionManager.java |
String message = "Your connection was closed due to an error."; | String message = Res.getString("message.disconnected.error"); | public void run() { Log.error("Connection closed on error.", ex); String message = "Your connection was closed due to an error."; if (ex instanceof XMPPException) { XMPPException xmppEx = (XMPPException)ex; StreamError error ... | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/97917d876023996dcd3bd220e88b62b3f6dcb7fc/SessionManager.java/buggy/src/java/org/jivesoftware/spark/SessionManager.java |
message = "Your connection was closed due to the same user logging in from another location."; | message = Res.getString("message.disconnected.conflict.error"); | public void run() { Log.error("Connection closed on error.", ex); String message = "Your connection was closed due to an error."; if (ex instanceof XMPPException) { XMPPException xmppEx = (XMPPException)ex; StreamError error ... | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/97917d876023996dcd3bd220e88b62b3f6dcb7fc/SessionManager.java/buggy/src/java/org/jivesoftware/spark/SessionManager.java |
p.setStatus("User has locked their workstation."); | p.setStatus(Res.getString("message.locked.workstation")); | private void setIdleListener() throws Exception { final Timer timer = new Timer(); timer.scheduleAtFixedRate(new TimerTask() { public void run() { LocalPreferences localPref = SettingsManager.getLocalPreferences(); int delay = 0; if (localPref.is... | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/97917d876023996dcd3bd220e88b62b3f6dcb7fc/SessionManager.java/buggy/src/java/org/jivesoftware/spark/SessionManager.java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.