rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
meta
stringlengths
141
403
public synchronized void includeModule(IRubyObject arg) { testFrozen("module"); if (!isTaint()) { getRuntime().secure(4); } if (!(arg instanceof RubyModule)) { throw getRuntime().newTypeError("Wrong argument type " + arg.getMetaClass().getName() + " (expected Module)."); } RubyModule module = (RubyModule) arg; Map moduleMethods = module.getMethods(); // Make sure the module we include does not already exist if (isSame(module)) { return; } // Invalidate cache for all methods in the new included module in case a base class method // of the same name has already been cached. for (Iterator iter = moduleMethods.keySet().iterator(); iter.hasNext();) { String methodName = (String) iter.next(); getRuntime().getCacheMap().remove(methodName, searchMethod(methodName)); } // Include new module setSuperClass(module.newIncludeClass(getSuperClass())); // cnutter: removed iterative inclusion of module's superclasses, because it included them in reverse order // see RubyModule.newIncludeClass for replacement module.callMethod("included", this); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/f7fd42a4ed234e7ec538d58da2024183eee3d0f4/RubyModule.java/clean/src/org/jruby/RubyModule.java
Map moduleMethods = module.getMethods();
public synchronized void includeModule(IRubyObject arg) { testFrozen("module"); if (!isTaint()) { getRuntime().secure(4); } if (!(arg instanceof RubyModule)) { throw getRuntime().newTypeError("Wrong argument type " + arg.getMetaClass().getName() + " (expected Module)."); } RubyModule module = (RubyModule) arg; Map moduleMethods = module.getMethods(); // Make sure the module we include does not already exist if (isSame(module)) { return; } // Invalidate cache for all methods in the new included module in case a base class method // of the same name has already been cached. for (Iterator iter = moduleMethods.keySet().iterator(); iter.hasNext();) { String methodName = (String) iter.next(); getRuntime().getCacheMap().remove(methodName, searchMethod(methodName)); } // Include new module setSuperClass(module.newIncludeClass(getSuperClass())); // cnutter: removed iterative inclusion of module's superclasses, because it included them in reverse order // see RubyModule.newIncludeClass for replacement module.callMethod("included", this); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/f7fd42a4ed234e7ec538d58da2024183eee3d0f4/RubyModule.java/clean/src/org/jruby/RubyModule.java
for (Iterator iter = moduleMethods.keySet().iterator(); iter.hasNext();) { String methodName = (String) iter.next(); getRuntime().getCacheMap().remove(methodName, searchMethod(methodName));
infectBy(module); RubyModule p, c; boolean changed = false; boolean skip = false; c = this; while (module != null) { if (getNonIncludedClass() == module.getNonIncludedClass()) { throw getRuntime().newArgumentError("cyclic include detected"); } boolean superclassSeen = false; for (p = getSuperClass(); p != null; p = p.getSuperClass()) { if (p instanceof IncludedModuleWrapper) { if (p.getNonIncludedClass() == module.getNonIncludedClass()) { if (!superclassSeen) { c = p; } skip = true; break; } } else { superclassSeen = true; } } if (!skip) { c.setSuperClass(new IncludedModuleWrapper(getRuntime(), c.getSuperClass(), module.getNonIncludedClass())); c = c.getSuperClass(); changed = true; } module = module.getSuperClass(); skip = false;
public synchronized void includeModule(IRubyObject arg) { testFrozen("module"); if (!isTaint()) { getRuntime().secure(4); } if (!(arg instanceof RubyModule)) { throw getRuntime().newTypeError("Wrong argument type " + arg.getMetaClass().getName() + " (expected Module)."); } RubyModule module = (RubyModule) arg; Map moduleMethods = module.getMethods(); // Make sure the module we include does not already exist if (isSame(module)) { return; } // Invalidate cache for all methods in the new included module in case a base class method // of the same name has already been cached. for (Iterator iter = moduleMethods.keySet().iterator(); iter.hasNext();) { String methodName = (String) iter.next(); getRuntime().getCacheMap().remove(methodName, searchMethod(methodName)); } // Include new module setSuperClass(module.newIncludeClass(getSuperClass())); // cnutter: removed iterative inclusion of module's superclasses, because it included them in reverse order // see RubyModule.newIncludeClass for replacement module.callMethod("included", this); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/f7fd42a4ed234e7ec538d58da2024183eee3d0f4/RubyModule.java/clean/src/org/jruby/RubyModule.java
setSuperClass(module.newIncludeClass(getSuperClass())); module.callMethod("included", this);
if (changed) { for (Iterator iter = ((RubyModule) arg).getMethods().keySet().iterator(); iter.hasNext();) { String methodName = (String) iter.next(); getRuntime().getCacheMap().remove(methodName, searchMethod(methodName)); } }
public synchronized void includeModule(IRubyObject arg) { testFrozen("module"); if (!isTaint()) { getRuntime().secure(4); } if (!(arg instanceof RubyModule)) { throw getRuntime().newTypeError("Wrong argument type " + arg.getMetaClass().getName() + " (expected Module)."); } RubyModule module = (RubyModule) arg; Map moduleMethods = module.getMethods(); // Make sure the module we include does not already exist if (isSame(module)) { return; } // Invalidate cache for all methods in the new included module in case a base class method // of the same name has already been cached. for (Iterator iter = moduleMethods.keySet().iterator(); iter.hasNext();) { String methodName = (String) iter.next(); getRuntime().getCacheMap().remove(methodName, searchMethod(methodName)); } // Include new module setSuperClass(module.newIncludeClass(getSuperClass())); // cnutter: removed iterative inclusion of module's superclasses, because it included them in reverse order // see RubyModule.newIncludeClass for replacement module.callMethod("included", this); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/f7fd42a4ed234e7ec538d58da2024183eee3d0f4/RubyModule.java/clean/src/org/jruby/RubyModule.java
return module.getMethods() == getMethods();
return this == module;
public boolean isSame(RubyModule module) { // FIXME: lame equality check; need something better return module.getMethods() == getMethods(); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/f7fd42a4ed234e7ec538d58da2024183eee3d0f4/RubyModule.java/clean/src/org/jruby/RubyModule.java
public void handleChange(IObservable source) {
public void handleChange(ChangeEvent event) {
public void handleChange(IObservable source) { count++; this.source = source; }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/6aecdb31231a8602dbf72944625703c440949c78/UnmodifiableObservableListTest.java/clean/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/observable/UnmodifiableObservableListTest.java
this.source = source;
this.source = event.getObservable();
public void handleChange(IObservable source) { count++; this.source = source; }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/6aecdb31231a8602dbf72944625703c440949c78/UnmodifiableObservableListTest.java/clean/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/observable/UnmodifiableObservableListTest.java
public void handleListChange(IObservableList source, ListDiff diff) {
public void handleListChange(ListChangeEvent event) {
public void handleListChange(IObservableList source, ListDiff diff) { count++; this.source = source; this.diff = diff; }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/6aecdb31231a8602dbf72944625703c440949c78/UnmodifiableObservableListTest.java/clean/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/observable/UnmodifiableObservableListTest.java
this.source = source; this.diff = diff;
this.source = event.getObservableList(); this.diff = event.diff;
public void handleListChange(IObservableList source, ListDiff diff) { count++; this.source = source; this.diff = diff; }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/6aecdb31231a8602dbf72944625703c440949c78/UnmodifiableObservableListTest.java/clean/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/observable/UnmodifiableObservableListTest.java
public void handleStale(IObservable source) {
public void handleStale(StaleEvent event) {
public void handleStale(IObservable source) { count++; this.source = source; }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/6aecdb31231a8602dbf72944625703c440949c78/UnmodifiableObservableListTest.java/clean/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/observable/UnmodifiableObservableListTest.java
this.source = source;
this.source = event.getObservable();
public void handleStale(IObservable source) { count++; this.source = source; }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/6aecdb31231a8602dbf72944625703c440949c78/UnmodifiableObservableListTest.java/clean/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/observable/UnmodifiableObservableListTest.java
throw new RubyNameException(ruby, name + " is not struct member");
throw new NameError(ruby, name + " is not struct member");
public RubyObject get() { String name = ruby.getRubyFrame().getLastFunc(); RubyArray member = (RubyArray) getInstanceVariable(classOf(), "__member__"); if (member.isNil()) { throw new RubyBugException("uninitialized struct"); } for (int i = 0; i < member.getLength(); i++) { if (member.entry(i).toId().equals(name)) { return values[i]; } } throw new RubyNameException(ruby, name + " is not struct member"); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/8140cac1b7c2375c549787852e38fa6c52b199df/RubyStruct.java/clean/org/jruby/RubyStruct.java
throw new RubyNameException(ruby, name + " is not struct member");
throw new NameError(ruby, name + " is not struct member");
private RubyObject getByName(String name) { RubyArray member = (RubyArray) getInstanceVariable(classOf(), "__member__"); if (member.isNil()) { throw new RubyBugException("uninitialized struct"); } for (int i = 0; i < member.getLength(); i++) { if (member.entry(i).toId().equals(name)) { return values[i]; } } throw new RubyNameException(ruby, name + " is not struct member"); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/8140cac1b7c2375c549787852e38fa6c52b199df/RubyStruct.java/clean/org/jruby/RubyStruct.java
throw new RubyNameException(ruby, name + " is not struct member");
throw new NameError(ruby, name + " is not struct member");
public RubyObject set(RubyObject value) { String name = ruby.getRubyFrame().getLastFunc(); RubyArray member = (RubyArray) getInstanceVariable(classOf(), "__member__"); if (member.isNil()) { throw new RubyBugException("uninitialized struct"); } modify(); for (int i = 0; i < member.getLength(); i++) { if (member.entry(i).toId().equals(name)) { return values[i] = value; } } throw new RubyNameException(ruby, name + " is not struct member"); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/8140cac1b7c2375c549787852e38fa6c52b199df/RubyStruct.java/clean/org/jruby/RubyStruct.java
throw new RubyNameException(ruby, name + " is not struct member");
throw new NameError(ruby, name + " is not struct member");
private RubyObject setByName(String name, RubyObject value) { RubyArray member = (RubyArray) getInstanceVariable(classOf(), "__member__"); if (member.isNil()) { throw new RubyBugException("uninitialized struct"); } modify(); for (int i = 0; i < member.getLength(); i++) { if (member.entry(i).toId().equals(name)) { return values[i] = value; } } throw new RubyNameException(ruby, name + " is not struct member"); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/8140cac1b7c2375c549787852e38fa6c52b199df/RubyStruct.java/clean/org/jruby/RubyStruct.java
IRubyObject receiver = state.begin(iVisited.getReceiverNode());
IRubyObject receiver = EvaluationState.eval(runtime.getCurrentContext(), iVisited.getReceiverNode(), runtime.getCurrentContext().getFrameSelf());
public Instruction visitCallNode(CallNode iVisited) { IRubyObject receiver = state.begin(iVisited.getReceiverNode()); if (iVisited.getArgsNode() == null) { // attribute set. receiver.callMethod(iVisited.getName(), new IRubyObject[] {value}, CallType.NORMAL); } else { // element set RubyArray args = (RubyArray)state.begin(iVisited.getArgsNode()); args.append(value); receiver.callMethod(iVisited.getName(), args.toJavaArray(), CallType.NORMAL); } return null; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/6e15491217631472c05c6928672f9c7064a978b3/AssignmentVisitor.java/buggy/src/org/jruby/evaluator/AssignmentVisitor.java
RubyArray args = (RubyArray)state.begin(iVisited.getArgsNode());
RubyArray args = (RubyArray)EvaluationState.eval(runtime.getCurrentContext(), iVisited.getArgsNode(), runtime.getCurrentContext().getFrameSelf());
public Instruction visitCallNode(CallNode iVisited) { IRubyObject receiver = state.begin(iVisited.getReceiverNode()); if (iVisited.getArgsNode() == null) { // attribute set. receiver.callMethod(iVisited.getName(), new IRubyObject[] {value}, CallType.NORMAL); } else { // element set RubyArray args = (RubyArray)state.begin(iVisited.getArgsNode()); args.append(value); receiver.callMethod(iVisited.getName(), args.toJavaArray(), CallType.NORMAL); } return null; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/6e15491217631472c05c6928672f9c7064a978b3/AssignmentVisitor.java/buggy/src/org/jruby/evaluator/AssignmentVisitor.java
state.getThreadContext().getRubyClass().setClassVar(iVisited.getName(), value);
runtime.getCurrentContext().getRubyClass().setClassVar(iVisited.getName(), value);
public Instruction visitClassVarAsgnNode(ClassVarAsgnNode iVisited) { state.getThreadContext().getRubyClass().setClassVar(iVisited.getName(), value); return null; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/6e15491217631472c05c6928672f9c7064a978b3/AssignmentVisitor.java/buggy/src/org/jruby/evaluator/AssignmentVisitor.java
ThreadContext tc = state.getThreadContext(); if (state.runtime.getVerbose().isTrue()
ThreadContext tc = runtime.getCurrentContext(); if (runtime.getVerbose().isTrue()
public Instruction visitClassVarDeclNode(ClassVarDeclNode iVisited) { ThreadContext tc = state.getThreadContext(); if (state.runtime.getVerbose().isTrue() && tc.getRubyClass().isSingleton()) { state.runtime.getWarnings().warn(iVisited.getPosition(), "Declaring singleton class variable."); } tc.getRubyClass().setClassVar(iVisited.getName(), value); return null; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/6e15491217631472c05c6928672f9c7064a978b3/AssignmentVisitor.java/buggy/src/org/jruby/evaluator/AssignmentVisitor.java
state.runtime.getWarnings().warn(iVisited.getPosition(),
runtime.getWarnings().warn(iVisited.getPosition(),
public Instruction visitClassVarDeclNode(ClassVarDeclNode iVisited) { ThreadContext tc = state.getThreadContext(); if (state.runtime.getVerbose().isTrue() && tc.getRubyClass().isSingleton()) { state.runtime.getWarnings().warn(iVisited.getPosition(), "Declaring singleton class variable."); } tc.getRubyClass().setClassVar(iVisited.getName(), value); return null; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/6e15491217631472c05c6928672f9c7064a978b3/AssignmentVisitor.java/buggy/src/org/jruby/evaluator/AssignmentVisitor.java
state.getThreadContext().getRubyClass().defineConstant(iVisited.getName(), value);
runtime.getCurrentContext().getRubyClass().defineConstant(iVisited.getName(), value);
public Instruction visitConstDeclNode(ConstDeclNode iVisited) { if (iVisited.getPathNode() == null) { state.getThreadContext().getRubyClass().defineConstant(iVisited.getName(), value); } else { ((RubyModule) state.begin(iVisited.getPathNode())).defineConstant(iVisited.getName(), value); } return null; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/6e15491217631472c05c6928672f9c7064a978b3/AssignmentVisitor.java/buggy/src/org/jruby/evaluator/AssignmentVisitor.java
((RubyModule) state.begin(iVisited.getPathNode())).defineConstant(iVisited.getName(), value);
((RubyModule) EvaluationState.eval(runtime.getCurrentContext(), iVisited.getPathNode(), runtime.getCurrentContext().getFrameSelf())).defineConstant(iVisited.getName(), value);
public Instruction visitConstDeclNode(ConstDeclNode iVisited) { if (iVisited.getPathNode() == null) { state.getThreadContext().getRubyClass().defineConstant(iVisited.getName(), value); } else { ((RubyModule) state.begin(iVisited.getPathNode())).defineConstant(iVisited.getName(), value); } return null; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/6e15491217631472c05c6928672f9c7064a978b3/AssignmentVisitor.java/buggy/src/org/jruby/evaluator/AssignmentVisitor.java
state.getThreadContext().getCurrentDynamicVars().set(iVisited.getName(), value);
runtime.getCurrentContext().getCurrentDynamicVars().set(iVisited.getName(), value);
public Instruction visitDAsgnNode(DAsgnNode iVisited) { state.getThreadContext().getCurrentDynamicVars().set(iVisited.getName(), value); return null; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/6e15491217631472c05c6928672f9c7064a978b3/AssignmentVisitor.java/buggy/src/org/jruby/evaluator/AssignmentVisitor.java
state.runtime.getGlobalVariables().set(iVisited.getName(), value);
runtime.getGlobalVariables().set(iVisited.getName(), value);
public Instruction visitGlobalAsgnNode(GlobalAsgnNode iVisited) { state.runtime.getGlobalVariables().set(iVisited.getName(), value); return null; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/6e15491217631472c05c6928672f9c7064a978b3/AssignmentVisitor.java/buggy/src/org/jruby/evaluator/AssignmentVisitor.java
state.getSelf().setInstanceVariable(iVisited.getName(), value);
self.setInstanceVariable(iVisited.getName(), value);
public Instruction visitInstAsgnNode(InstAsgnNode iVisited) { state.getSelf().setInstanceVariable(iVisited.getName(), value); return null; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/6e15491217631472c05c6928672f9c7064a978b3/AssignmentVisitor.java/buggy/src/org/jruby/evaluator/AssignmentVisitor.java
state.runtime.getCurrentContext().getFrameScope().setValue(iVisited.getCount(), value);
runtime.getCurrentContext().getFrameScope().setValue(iVisited.getCount(), value);
public Instruction visitLocalAsgnNode(LocalAsgnNode iVisited) { state.runtime.getCurrentContext().getFrameScope().setValue(iVisited.getCount(), value); return null; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/6e15491217631472c05c6928672f9c7064a978b3/AssignmentVisitor.java/buggy/src/org/jruby/evaluator/AssignmentVisitor.java
value = RubyArray.newArray(state.runtime, value);
value = RubyArray.newArray(runtime, value);
public Instruction visitMultipleAsgnNode(MultipleAsgnNode iVisited) { if (!(value instanceof RubyArray)) { value = RubyArray.newArray(state.runtime, value); } state.setResult(state.getThreadContext() .mAssign(state.getSelf(), iVisited, (RubyArray) value, check)); return null; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/6e15491217631472c05c6928672f9c7064a978b3/AssignmentVisitor.java/buggy/src/org/jruby/evaluator/AssignmentVisitor.java
state.setResult(state.getThreadContext() .mAssign(state.getSelf(), iVisited, (RubyArray) value, check));
result = runtime.getCurrentContext() .mAssign(self, iVisited, (RubyArray) value, check);
public Instruction visitMultipleAsgnNode(MultipleAsgnNode iVisited) { if (!(value instanceof RubyArray)) { value = RubyArray.newArray(state.runtime, value); } state.setResult(state.getThreadContext() .mAssign(state.getSelf(), iVisited, (RubyArray) value, check)); return null; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/6e15491217631472c05c6928672f9c7064a978b3/AssignmentVisitor.java/buggy/src/org/jruby/evaluator/AssignmentVisitor.java
long[] idxs = ((RubyRange) args[0]).getBeginLength(getValue().length(), false, true);
long[] idxs = ((RubyRange) args[0]).getBeginLength(getValue().length(), true, true);
public RubyObject aset(RubyObject[] args) { int strLen = getValue().length(); if (argCount(args, 2, 3) == 3) { RubyString repl = stringValue(args[2]); int beg = RubyNumeric.fix2int(args[0]); int len = RubyNumeric.fix2int(args[1]); if (len < 0) { throw new RubyIndexException(getRuby(), "negative length"); } if (beg < 0) { beg += strLen; } if (beg < 0 || beg >= strLen) { throw new RubyIndexException(getRuby(), "string index out of bounds"); } if (beg + len > strLen) { len = strLen - beg; } replace(beg, len, repl); return repl; } if (args[0] instanceof RubyFixnum) { // RubyNumeric? int idx = RubyNumeric.fix2int(args[0]); // num2int? if (idx < 0) { idx += getValue().length(); } if (idx < 0 || idx >= getValue().length()) { throw new RubyIndexException(getRuby(), "string index out of bounds"); } if (args[1] instanceof RubyFixnum) { char c = (char) RubyNumeric.fix2int(args[1]); setValue(getValue().substring(0, idx) + c + getValue().substring(idx + 1)); } else { replace(idx, 1, stringValue(args[1])); } return args[1]; } if (args[0] instanceof RubyRegexp) { sub_bang(args); return args[1]; } if (args[0] instanceof RubyString) { RubyString orig = stringValue(args[0]); int beg = getValue().indexOf(orig.getValue()); if (beg != -1) { replace(beg, orig.getValue().length(), stringValue(args[1])); } return args[1]; } if (args[0] instanceof RubyRange) { long[] idxs = ((RubyRange) args[0]).getBeginLength(getValue().length(), false, true); replace((int) idxs[0], (int) idxs[1], stringValue(args[1])); return args[1]; } throw new TypeError(getRuby(), "wrong argument type"); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/5882d0febb3f8ecc0652256e027730f39165ff8d/RubyString.java/buggy/org/jruby/RubyString.java
try { return (RubyString) other.convertType(RubyString.class, "String", "to_str"); } catch (Exception ex) { throw new ArgumentError(other.getRuby(), "can't convert arg to String: " + ex.getMessage()); }
return (RubyString) other.convertType(RubyString.class, "String", "to_str");
public static RubyString stringValue(RubyObject other) { if (other instanceof RubyString) { return (RubyString) other; } else { try { return (RubyString) other.convertType(RubyString.class, "String", "to_str"); } catch (Exception ex) { throw new ArgumentError(other.getRuby(), "can't convert arg to String: " + ex.getMessage()); } } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/5882d0febb3f8ecc0652256e027730f39165ff8d/RubyString.java/buggy/org/jruby/RubyString.java
public boolean isRemoveable(){return true;}
public boolean isRemoveable(){return removeable;}
public boolean isRemoveable(){return true;}
54846 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54846/70b3f8bad2b35c1e312d39cc905d223c842e06c6/SiteAction.java/buggy/site-manage-tool/tool/src/java/org/sakaiproject/site/tool/SiteAction.java
if (((Member) iSet.next()).getUserId().equals(aId))
if (((Member) iSet.next()).getUserEid().equals(aId))
public void doGroup_update ( RunData data ) { SessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ()); ParameterParser params = data.getParameters (); Set gMemberSet = (Set) state.getAttribute(STATE_GROUP_MEMBERS); Site site = getStateSite(state); String title = StringUtil.trimToNull(params.getString(rb.getString("group.title"))); state.setAttribute(STATE_GROUP_TITLE, title); String description = StringUtil.trimToZero(params.getString(rb.getString("group.description"))); state.setAttribute(STATE_GROUP_DESCRIPTION, description); boolean found = false; String option = params.getString("option"); if (option.equals("add")) { // add selected members into it if (params.getStrings("generallist") != null) { List addMemberIds = new ArrayList(Arrays.asList(params.getStrings("generallist"))); for (int i=0; i<addMemberIds.size(); i++) { String aId = (String) addMemberIds.get(i); found = false; for(Iterator iSet = gMemberSet.iterator(); !found && iSet.hasNext();) { if (((Member) iSet.next()).getUserId().equals(aId)) { found = true; } } if (!found) { gMemberSet.add(site.getMember(aId)); } } } state.setAttribute(STATE_GROUP_MEMBERS, gMemberSet); } else if (option.equals("remove")) { // update the group member list by remove selected members from it if (params.getStrings("grouplist") != null) { List removeMemberIds = new ArrayList(Arrays.asList(params.getStrings("grouplist"))); for (int i=0; i<removeMemberIds.size(); i++) { found = false; for(Iterator iSet = gMemberSet.iterator(); !found && iSet.hasNext();) { Member mSet = (Member) iSet.next(); if (mSet.getUserId().equals((String) removeMemberIds.get(i))) { found = true; gMemberSet.remove(mSet); } } } } state.setAttribute(STATE_GROUP_MEMBERS, gMemberSet); } else if (option.equals("cancel")) { // cancel from the update the group member process doCancel(data); cleanEditGroupParams(state); } else if (option.equals("save")) { Group group = null; if (site != null && state.getAttribute(STATE_GROUP_INSTANCE_ID) != null) { try { group = site.getGroup((String) state.getAttribute(STATE_GROUP_INSTANCE_ID)); } catch (Exception ignore) { } } if (title == null) { addAlert(state, rb.getString("editgroup.titlemissing")); } if (state.getAttribute(STATE_MESSAGE) == null) { if (group == null) { // adding new group group = site.addGroup(); group.getProperties().addProperty(GROUP_PROP_WSETUP_CREATED, Boolean.TRUE.toString()); } if (group != null) { group.setTitle(title); group.setDescription(description); // save the modification to group members // remove those no longer included in the group Set members = group.getMembers(); for(Iterator iMembers = members.iterator(); iMembers.hasNext();) { found = false; String mId = ((Member)iMembers.next()).getUserId(); for(Iterator iMemberSet = gMemberSet.iterator(); !found && iMemberSet.hasNext();) { if (mId.equals(((Member) iMemberSet.next()).getUserId())) { found = true; } } if (!found) { group.removeMember(mId); } } // add those seleted members for(Iterator iMemberSet = gMemberSet.iterator(); iMemberSet.hasNext();) { String memberId = ((Member) iMemberSet.next()).getUserId(); if (group.getUserRole(memberId) == null) { Role r = site.getUserRole(memberId); Member m = site.getMember(memberId); // for every member added through the "Manage Groups" interface, he should be defined as non-provided group.addMember(memberId, r!= null?r.getId():"", m!=null?m.isActive():true, false); } } if (state.getAttribute(STATE_MESSAGE) == null) { try { SiteService.save(site); } catch (IdUnusedException e) { } catch (PermissionException e) { } // return to group list view state.setAttribute (STATE_TEMPLATE_INDEX, "49"); cleanEditGroupParams(state); } } } } } // doGroup_updatemembers
54846 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54846/70b3f8bad2b35c1e312d39cc905d223c842e06c6/SiteAction.java/buggy/site-manage-tool/tool/src/java/org/sakaiproject/site/tool/SiteAction.java
gMemberSet.add(site.getMember(aId));
try { User u = UserDirectoryService.getUser(aId); gMemberSet.add(site.getMember(u.getId())); } catch (UserNotDefinedException e) { try { User u2 = UserDirectoryService.getUserByEid(aId); gMemberSet.add(site.getMember(u2.getId())); } catch (UserNotDefinedException ee) { M_log.warn(this + ee.getMessage() + aId); } }
public void doGroup_update ( RunData data ) { SessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ()); ParameterParser params = data.getParameters (); Set gMemberSet = (Set) state.getAttribute(STATE_GROUP_MEMBERS); Site site = getStateSite(state); String title = StringUtil.trimToNull(params.getString(rb.getString("group.title"))); state.setAttribute(STATE_GROUP_TITLE, title); String description = StringUtil.trimToZero(params.getString(rb.getString("group.description"))); state.setAttribute(STATE_GROUP_DESCRIPTION, description); boolean found = false; String option = params.getString("option"); if (option.equals("add")) { // add selected members into it if (params.getStrings("generallist") != null) { List addMemberIds = new ArrayList(Arrays.asList(params.getStrings("generallist"))); for (int i=0; i<addMemberIds.size(); i++) { String aId = (String) addMemberIds.get(i); found = false; for(Iterator iSet = gMemberSet.iterator(); !found && iSet.hasNext();) { if (((Member) iSet.next()).getUserId().equals(aId)) { found = true; } } if (!found) { gMemberSet.add(site.getMember(aId)); } } } state.setAttribute(STATE_GROUP_MEMBERS, gMemberSet); } else if (option.equals("remove")) { // update the group member list by remove selected members from it if (params.getStrings("grouplist") != null) { List removeMemberIds = new ArrayList(Arrays.asList(params.getStrings("grouplist"))); for (int i=0; i<removeMemberIds.size(); i++) { found = false; for(Iterator iSet = gMemberSet.iterator(); !found && iSet.hasNext();) { Member mSet = (Member) iSet.next(); if (mSet.getUserId().equals((String) removeMemberIds.get(i))) { found = true; gMemberSet.remove(mSet); } } } } state.setAttribute(STATE_GROUP_MEMBERS, gMemberSet); } else if (option.equals("cancel")) { // cancel from the update the group member process doCancel(data); cleanEditGroupParams(state); } else if (option.equals("save")) { Group group = null; if (site != null && state.getAttribute(STATE_GROUP_INSTANCE_ID) != null) { try { group = site.getGroup((String) state.getAttribute(STATE_GROUP_INSTANCE_ID)); } catch (Exception ignore) { } } if (title == null) { addAlert(state, rb.getString("editgroup.titlemissing")); } if (state.getAttribute(STATE_MESSAGE) == null) { if (group == null) { // adding new group group = site.addGroup(); group.getProperties().addProperty(GROUP_PROP_WSETUP_CREATED, Boolean.TRUE.toString()); } if (group != null) { group.setTitle(title); group.setDescription(description); // save the modification to group members // remove those no longer included in the group Set members = group.getMembers(); for(Iterator iMembers = members.iterator(); iMembers.hasNext();) { found = false; String mId = ((Member)iMembers.next()).getUserId(); for(Iterator iMemberSet = gMemberSet.iterator(); !found && iMemberSet.hasNext();) { if (mId.equals(((Member) iMemberSet.next()).getUserId())) { found = true; } } if (!found) { group.removeMember(mId); } } // add those seleted members for(Iterator iMemberSet = gMemberSet.iterator(); iMemberSet.hasNext();) { String memberId = ((Member) iMemberSet.next()).getUserId(); if (group.getUserRole(memberId) == null) { Role r = site.getUserRole(memberId); Member m = site.getMember(memberId); // for every member added through the "Manage Groups" interface, he should be defined as non-provided group.addMember(memberId, r!= null?r.getId():"", m!=null?m.isActive():true, false); } } if (state.getAttribute(STATE_MESSAGE) == null) { try { SiteService.save(site); } catch (IdUnusedException e) { } catch (PermissionException e) { } // return to group list view state.setAttribute (STATE_TEMPLATE_INDEX, "49"); cleanEditGroupParams(state); } } } } } // doGroup_updatemembers
54846 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54846/70b3f8bad2b35c1e312d39cc905d223c842e06c6/SiteAction.java/buggy/site-manage-tool/tool/src/java/org/sakaiproject/site/tool/SiteAction.java
String eId = null;
String id = null;
public void doUpdate_participant(RunData data) { SessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ()); ParameterParser params = data.getParameters (); Site s = getStateSite(state); String realmId = SiteService.siteReference(s.getId()); if (AuthzGroupService.allowUpdate(realmId) || SiteService.allowUpdateSiteMembership(s.getId())) { try { AuthzGroup realmEdit = AuthzGroupService.getAuthzGroup(realmId); // update participant roles List participants = (List) state.getAttribute(STATE_PARTICIPANT_LIST);; // remove all roles and then add back those that were checked for (int i=0; i<participants.size(); i++) { String eId = null; // added participant Object participant = (Object) participants.get(i); if (participant.getClass().equals(Participant.class)) { eId = ((Participant) participant).getUniqname(); } else if (participant.getClass().equals(CourseMember.class)) { // course member eId = ((CourseMember) participant).getUniqname(); } if (eId != null) { //get the newly assigned role String inputRoleField = "role" + eId; String roleId = params.getString(inputRoleField); // only change roles when they are different than before if (roleId!= null) { // get the grant active status boolean activeGrant = true; String activeGrantField = "activeGrant" + eId; if (params.getString(activeGrantField) != null) { activeGrant = params.getString(activeGrantField).equalsIgnoreCase("true")?true:false; } boolean fromProvider = false; if (participant.getClass().equals(CourseMember.class)) { if (roleId.equals(((CourseMember) participant).getProviderRole())) { fromProvider = true; } } try { User user = UserDirectoryService.getUserByEid(eId); realmEdit.addMember(user.getId(), roleId, activeGrant, fromProvider); } catch (UserNotDefinedException e) { M_log.warn(this + " IdUnusedException " + eId + ". "); } } } } //remove selected users if (params.getStrings ("selectedUser") != null) { List removals = new ArrayList(Arrays.asList(params.getStrings ("selectedUser"))); state.setAttribute(STATE_SELECTED_USER_LIST, removals); for(int i = 0; i<removals.size(); i++) { String rEId = (String) removals.get(i); try { User user = UserDirectoryService.getUserByEid(rEId); Participant selected = new Participant(); selected.name = user.getDisplayName(); selected.uniqname = user.getId(); realmEdit.removeMember(user.getId()); } catch (UserNotDefinedException e) { M_log.warn(this + " IdUnusedException " + rEId + ". "); } } } String maintainRoleString = realmEdit.getMaintainRole(); if (realmEdit.getUsersHasRole(maintainRoleString).isEmpty()) { // if after update, there is no maintainer role user for the site, show alert message and don't save the update addAlert(state, rb.getString("sitegen.siteinfolist.nomaintainuser") + maintainRoleString + "."); } else { AuthzGroupService.save(realmEdit); } } catch (GroupNotDefinedException e) { addAlert(state, rb.getString("java.problem2")); M_log.warn(this + " IdUnusedException " + s.getTitle() + "(" + realmId + "). "); } catch(AuthzPermissionException e) { addAlert(state, rb.getString("java.changeroles")); M_log.warn(this + " PermissionException " + s.getTitle() + "(" + realmId + "). "); } } } // doUpdate_participant
54846 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54846/70b3f8bad2b35c1e312d39cc905d223c842e06c6/SiteAction.java/buggy/site-manage-tool/tool/src/java/org/sakaiproject/site/tool/SiteAction.java
Object participant = (Object) participants.get(i); if (participant.getClass().equals(Participant.class)) { eId = ((Participant) participant).getUniqname(); } else if (participant.getClass().equals(CourseMember.class)) { eId = ((CourseMember) participant).getUniqname(); }
Participant participant = (Participant) participants.get(i); id = participant.getUniqname();
public void doUpdate_participant(RunData data) { SessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ()); ParameterParser params = data.getParameters (); Site s = getStateSite(state); String realmId = SiteService.siteReference(s.getId()); if (AuthzGroupService.allowUpdate(realmId) || SiteService.allowUpdateSiteMembership(s.getId())) { try { AuthzGroup realmEdit = AuthzGroupService.getAuthzGroup(realmId); // update participant roles List participants = (List) state.getAttribute(STATE_PARTICIPANT_LIST);; // remove all roles and then add back those that were checked for (int i=0; i<participants.size(); i++) { String eId = null; // added participant Object participant = (Object) participants.get(i); if (participant.getClass().equals(Participant.class)) { eId = ((Participant) participant).getUniqname(); } else if (participant.getClass().equals(CourseMember.class)) { // course member eId = ((CourseMember) participant).getUniqname(); } if (eId != null) { //get the newly assigned role String inputRoleField = "role" + eId; String roleId = params.getString(inputRoleField); // only change roles when they are different than before if (roleId!= null) { // get the grant active status boolean activeGrant = true; String activeGrantField = "activeGrant" + eId; if (params.getString(activeGrantField) != null) { activeGrant = params.getString(activeGrantField).equalsIgnoreCase("true")?true:false; } boolean fromProvider = false; if (participant.getClass().equals(CourseMember.class)) { if (roleId.equals(((CourseMember) participant).getProviderRole())) { fromProvider = true; } } try { User user = UserDirectoryService.getUserByEid(eId); realmEdit.addMember(user.getId(), roleId, activeGrant, fromProvider); } catch (UserNotDefinedException e) { M_log.warn(this + " IdUnusedException " + eId + ". "); } } } } //remove selected users if (params.getStrings ("selectedUser") != null) { List removals = new ArrayList(Arrays.asList(params.getStrings ("selectedUser"))); state.setAttribute(STATE_SELECTED_USER_LIST, removals); for(int i = 0; i<removals.size(); i++) { String rEId = (String) removals.get(i); try { User user = UserDirectoryService.getUserByEid(rEId); Participant selected = new Participant(); selected.name = user.getDisplayName(); selected.uniqname = user.getId(); realmEdit.removeMember(user.getId()); } catch (UserNotDefinedException e) { M_log.warn(this + " IdUnusedException " + rEId + ". "); } } } String maintainRoleString = realmEdit.getMaintainRole(); if (realmEdit.getUsersHasRole(maintainRoleString).isEmpty()) { // if after update, there is no maintainer role user for the site, show alert message and don't save the update addAlert(state, rb.getString("sitegen.siteinfolist.nomaintainuser") + maintainRoleString + "."); } else { AuthzGroupService.save(realmEdit); } } catch (GroupNotDefinedException e) { addAlert(state, rb.getString("java.problem2")); M_log.warn(this + " IdUnusedException " + s.getTitle() + "(" + realmId + "). "); } catch(AuthzPermissionException e) { addAlert(state, rb.getString("java.changeroles")); M_log.warn(this + " PermissionException " + s.getTitle() + "(" + realmId + "). "); } } } // doUpdate_participant
54846 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54846/70b3f8bad2b35c1e312d39cc905d223c842e06c6/SiteAction.java/buggy/site-manage-tool/tool/src/java/org/sakaiproject/site/tool/SiteAction.java
if (eId != null)
if (id != null)
public void doUpdate_participant(RunData data) { SessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ()); ParameterParser params = data.getParameters (); Site s = getStateSite(state); String realmId = SiteService.siteReference(s.getId()); if (AuthzGroupService.allowUpdate(realmId) || SiteService.allowUpdateSiteMembership(s.getId())) { try { AuthzGroup realmEdit = AuthzGroupService.getAuthzGroup(realmId); // update participant roles List participants = (List) state.getAttribute(STATE_PARTICIPANT_LIST);; // remove all roles and then add back those that were checked for (int i=0; i<participants.size(); i++) { String eId = null; // added participant Object participant = (Object) participants.get(i); if (participant.getClass().equals(Participant.class)) { eId = ((Participant) participant).getUniqname(); } else if (participant.getClass().equals(CourseMember.class)) { // course member eId = ((CourseMember) participant).getUniqname(); } if (eId != null) { //get the newly assigned role String inputRoleField = "role" + eId; String roleId = params.getString(inputRoleField); // only change roles when they are different than before if (roleId!= null) { // get the grant active status boolean activeGrant = true; String activeGrantField = "activeGrant" + eId; if (params.getString(activeGrantField) != null) { activeGrant = params.getString(activeGrantField).equalsIgnoreCase("true")?true:false; } boolean fromProvider = false; if (participant.getClass().equals(CourseMember.class)) { if (roleId.equals(((CourseMember) participant).getProviderRole())) { fromProvider = true; } } try { User user = UserDirectoryService.getUserByEid(eId); realmEdit.addMember(user.getId(), roleId, activeGrant, fromProvider); } catch (UserNotDefinedException e) { M_log.warn(this + " IdUnusedException " + eId + ". "); } } } } //remove selected users if (params.getStrings ("selectedUser") != null) { List removals = new ArrayList(Arrays.asList(params.getStrings ("selectedUser"))); state.setAttribute(STATE_SELECTED_USER_LIST, removals); for(int i = 0; i<removals.size(); i++) { String rEId = (String) removals.get(i); try { User user = UserDirectoryService.getUserByEid(rEId); Participant selected = new Participant(); selected.name = user.getDisplayName(); selected.uniqname = user.getId(); realmEdit.removeMember(user.getId()); } catch (UserNotDefinedException e) { M_log.warn(this + " IdUnusedException " + rEId + ". "); } } } String maintainRoleString = realmEdit.getMaintainRole(); if (realmEdit.getUsersHasRole(maintainRoleString).isEmpty()) { // if after update, there is no maintainer role user for the site, show alert message and don't save the update addAlert(state, rb.getString("sitegen.siteinfolist.nomaintainuser") + maintainRoleString + "."); } else { AuthzGroupService.save(realmEdit); } } catch (GroupNotDefinedException e) { addAlert(state, rb.getString("java.problem2")); M_log.warn(this + " IdUnusedException " + s.getTitle() + "(" + realmId + "). "); } catch(AuthzPermissionException e) { addAlert(state, rb.getString("java.changeroles")); M_log.warn(this + " PermissionException " + s.getTitle() + "(" + realmId + "). "); } } } // doUpdate_participant
54846 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54846/70b3f8bad2b35c1e312d39cc905d223c842e06c6/SiteAction.java/buggy/site-manage-tool/tool/src/java/org/sakaiproject/site/tool/SiteAction.java
String inputRoleField = "role" + eId;
String inputRoleField = "role" + id;
public void doUpdate_participant(RunData data) { SessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ()); ParameterParser params = data.getParameters (); Site s = getStateSite(state); String realmId = SiteService.siteReference(s.getId()); if (AuthzGroupService.allowUpdate(realmId) || SiteService.allowUpdateSiteMembership(s.getId())) { try { AuthzGroup realmEdit = AuthzGroupService.getAuthzGroup(realmId); // update participant roles List participants = (List) state.getAttribute(STATE_PARTICIPANT_LIST);; // remove all roles and then add back those that were checked for (int i=0; i<participants.size(); i++) { String eId = null; // added participant Object participant = (Object) participants.get(i); if (participant.getClass().equals(Participant.class)) { eId = ((Participant) participant).getUniqname(); } else if (participant.getClass().equals(CourseMember.class)) { // course member eId = ((CourseMember) participant).getUniqname(); } if (eId != null) { //get the newly assigned role String inputRoleField = "role" + eId; String roleId = params.getString(inputRoleField); // only change roles when they are different than before if (roleId!= null) { // get the grant active status boolean activeGrant = true; String activeGrantField = "activeGrant" + eId; if (params.getString(activeGrantField) != null) { activeGrant = params.getString(activeGrantField).equalsIgnoreCase("true")?true:false; } boolean fromProvider = false; if (participant.getClass().equals(CourseMember.class)) { if (roleId.equals(((CourseMember) participant).getProviderRole())) { fromProvider = true; } } try { User user = UserDirectoryService.getUserByEid(eId); realmEdit.addMember(user.getId(), roleId, activeGrant, fromProvider); } catch (UserNotDefinedException e) { M_log.warn(this + " IdUnusedException " + eId + ". "); } } } } //remove selected users if (params.getStrings ("selectedUser") != null) { List removals = new ArrayList(Arrays.asList(params.getStrings ("selectedUser"))); state.setAttribute(STATE_SELECTED_USER_LIST, removals); for(int i = 0; i<removals.size(); i++) { String rEId = (String) removals.get(i); try { User user = UserDirectoryService.getUserByEid(rEId); Participant selected = new Participant(); selected.name = user.getDisplayName(); selected.uniqname = user.getId(); realmEdit.removeMember(user.getId()); } catch (UserNotDefinedException e) { M_log.warn(this + " IdUnusedException " + rEId + ". "); } } } String maintainRoleString = realmEdit.getMaintainRole(); if (realmEdit.getUsersHasRole(maintainRoleString).isEmpty()) { // if after update, there is no maintainer role user for the site, show alert message and don't save the update addAlert(state, rb.getString("sitegen.siteinfolist.nomaintainuser") + maintainRoleString + "."); } else { AuthzGroupService.save(realmEdit); } } catch (GroupNotDefinedException e) { addAlert(state, rb.getString("java.problem2")); M_log.warn(this + " IdUnusedException " + s.getTitle() + "(" + realmId + "). "); } catch(AuthzPermissionException e) { addAlert(state, rb.getString("java.changeroles")); M_log.warn(this + " PermissionException " + s.getTitle() + "(" + realmId + "). "); } } } // doUpdate_participant
54846 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54846/70b3f8bad2b35c1e312d39cc905d223c842e06c6/SiteAction.java/buggy/site-manage-tool/tool/src/java/org/sakaiproject/site/tool/SiteAction.java
String activeGrantField = "activeGrant" + eId;
String activeGrantField = "activeGrant" + id;
public void doUpdate_participant(RunData data) { SessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ()); ParameterParser params = data.getParameters (); Site s = getStateSite(state); String realmId = SiteService.siteReference(s.getId()); if (AuthzGroupService.allowUpdate(realmId) || SiteService.allowUpdateSiteMembership(s.getId())) { try { AuthzGroup realmEdit = AuthzGroupService.getAuthzGroup(realmId); // update participant roles List participants = (List) state.getAttribute(STATE_PARTICIPANT_LIST);; // remove all roles and then add back those that were checked for (int i=0; i<participants.size(); i++) { String eId = null; // added participant Object participant = (Object) participants.get(i); if (participant.getClass().equals(Participant.class)) { eId = ((Participant) participant).getUniqname(); } else if (participant.getClass().equals(CourseMember.class)) { // course member eId = ((CourseMember) participant).getUniqname(); } if (eId != null) { //get the newly assigned role String inputRoleField = "role" + eId; String roleId = params.getString(inputRoleField); // only change roles when they are different than before if (roleId!= null) { // get the grant active status boolean activeGrant = true; String activeGrantField = "activeGrant" + eId; if (params.getString(activeGrantField) != null) { activeGrant = params.getString(activeGrantField).equalsIgnoreCase("true")?true:false; } boolean fromProvider = false; if (participant.getClass().equals(CourseMember.class)) { if (roleId.equals(((CourseMember) participant).getProviderRole())) { fromProvider = true; } } try { User user = UserDirectoryService.getUserByEid(eId); realmEdit.addMember(user.getId(), roleId, activeGrant, fromProvider); } catch (UserNotDefinedException e) { M_log.warn(this + " IdUnusedException " + eId + ". "); } } } } //remove selected users if (params.getStrings ("selectedUser") != null) { List removals = new ArrayList(Arrays.asList(params.getStrings ("selectedUser"))); state.setAttribute(STATE_SELECTED_USER_LIST, removals); for(int i = 0; i<removals.size(); i++) { String rEId = (String) removals.get(i); try { User user = UserDirectoryService.getUserByEid(rEId); Participant selected = new Participant(); selected.name = user.getDisplayName(); selected.uniqname = user.getId(); realmEdit.removeMember(user.getId()); } catch (UserNotDefinedException e) { M_log.warn(this + " IdUnusedException " + rEId + ". "); } } } String maintainRoleString = realmEdit.getMaintainRole(); if (realmEdit.getUsersHasRole(maintainRoleString).isEmpty()) { // if after update, there is no maintainer role user for the site, show alert message and don't save the update addAlert(state, rb.getString("sitegen.siteinfolist.nomaintainuser") + maintainRoleString + "."); } else { AuthzGroupService.save(realmEdit); } } catch (GroupNotDefinedException e) { addAlert(state, rb.getString("java.problem2")); M_log.warn(this + " IdUnusedException " + s.getTitle() + "(" + realmId + "). "); } catch(AuthzPermissionException e) { addAlert(state, rb.getString("java.changeroles")); M_log.warn(this + " PermissionException " + s.getTitle() + "(" + realmId + "). "); } } } // doUpdate_participant
54846 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54846/70b3f8bad2b35c1e312d39cc905d223c842e06c6/SiteAction.java/buggy/site-manage-tool/tool/src/java/org/sakaiproject/site/tool/SiteAction.java
boolean fromProvider = false; if (participant.getClass().equals(CourseMember.class))
boolean fromProvider = !participant.isRemoveable(); if(fromProvider && !roleId.equals(participant.getProviderRole()))
public void doUpdate_participant(RunData data) { SessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ()); ParameterParser params = data.getParameters (); Site s = getStateSite(state); String realmId = SiteService.siteReference(s.getId()); if (AuthzGroupService.allowUpdate(realmId) || SiteService.allowUpdateSiteMembership(s.getId())) { try { AuthzGroup realmEdit = AuthzGroupService.getAuthzGroup(realmId); // update participant roles List participants = (List) state.getAttribute(STATE_PARTICIPANT_LIST);; // remove all roles and then add back those that were checked for (int i=0; i<participants.size(); i++) { String eId = null; // added participant Object participant = (Object) participants.get(i); if (participant.getClass().equals(Participant.class)) { eId = ((Participant) participant).getUniqname(); } else if (participant.getClass().equals(CourseMember.class)) { // course member eId = ((CourseMember) participant).getUniqname(); } if (eId != null) { //get the newly assigned role String inputRoleField = "role" + eId; String roleId = params.getString(inputRoleField); // only change roles when they are different than before if (roleId!= null) { // get the grant active status boolean activeGrant = true; String activeGrantField = "activeGrant" + eId; if (params.getString(activeGrantField) != null) { activeGrant = params.getString(activeGrantField).equalsIgnoreCase("true")?true:false; } boolean fromProvider = false; if (participant.getClass().equals(CourseMember.class)) { if (roleId.equals(((CourseMember) participant).getProviderRole())) { fromProvider = true; } } try { User user = UserDirectoryService.getUserByEid(eId); realmEdit.addMember(user.getId(), roleId, activeGrant, fromProvider); } catch (UserNotDefinedException e) { M_log.warn(this + " IdUnusedException " + eId + ". "); } } } } //remove selected users if (params.getStrings ("selectedUser") != null) { List removals = new ArrayList(Arrays.asList(params.getStrings ("selectedUser"))); state.setAttribute(STATE_SELECTED_USER_LIST, removals); for(int i = 0; i<removals.size(); i++) { String rEId = (String) removals.get(i); try { User user = UserDirectoryService.getUserByEid(rEId); Participant selected = new Participant(); selected.name = user.getDisplayName(); selected.uniqname = user.getId(); realmEdit.removeMember(user.getId()); } catch (UserNotDefinedException e) { M_log.warn(this + " IdUnusedException " + rEId + ". "); } } } String maintainRoleString = realmEdit.getMaintainRole(); if (realmEdit.getUsersHasRole(maintainRoleString).isEmpty()) { // if after update, there is no maintainer role user for the site, show alert message and don't save the update addAlert(state, rb.getString("sitegen.siteinfolist.nomaintainuser") + maintainRoleString + "."); } else { AuthzGroupService.save(realmEdit); } } catch (GroupNotDefinedException e) { addAlert(state, rb.getString("java.problem2")); M_log.warn(this + " IdUnusedException " + s.getTitle() + "(" + realmId + "). "); } catch(AuthzPermissionException e) { addAlert(state, rb.getString("java.changeroles")); M_log.warn(this + " PermissionException " + s.getTitle() + "(" + realmId + "). "); } } } // doUpdate_participant
54846 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54846/70b3f8bad2b35c1e312d39cc905d223c842e06c6/SiteAction.java/buggy/site-manage-tool/tool/src/java/org/sakaiproject/site/tool/SiteAction.java
if (roleId.equals(((CourseMember) participant).getProviderRole())) { fromProvider = true; }
fromProvider=false;
public void doUpdate_participant(RunData data) { SessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ()); ParameterParser params = data.getParameters (); Site s = getStateSite(state); String realmId = SiteService.siteReference(s.getId()); if (AuthzGroupService.allowUpdate(realmId) || SiteService.allowUpdateSiteMembership(s.getId())) { try { AuthzGroup realmEdit = AuthzGroupService.getAuthzGroup(realmId); // update participant roles List participants = (List) state.getAttribute(STATE_PARTICIPANT_LIST);; // remove all roles and then add back those that were checked for (int i=0; i<participants.size(); i++) { String eId = null; // added participant Object participant = (Object) participants.get(i); if (participant.getClass().equals(Participant.class)) { eId = ((Participant) participant).getUniqname(); } else if (participant.getClass().equals(CourseMember.class)) { // course member eId = ((CourseMember) participant).getUniqname(); } if (eId != null) { //get the newly assigned role String inputRoleField = "role" + eId; String roleId = params.getString(inputRoleField); // only change roles when they are different than before if (roleId!= null) { // get the grant active status boolean activeGrant = true; String activeGrantField = "activeGrant" + eId; if (params.getString(activeGrantField) != null) { activeGrant = params.getString(activeGrantField).equalsIgnoreCase("true")?true:false; } boolean fromProvider = false; if (participant.getClass().equals(CourseMember.class)) { if (roleId.equals(((CourseMember) participant).getProviderRole())) { fromProvider = true; } } try { User user = UserDirectoryService.getUserByEid(eId); realmEdit.addMember(user.getId(), roleId, activeGrant, fromProvider); } catch (UserNotDefinedException e) { M_log.warn(this + " IdUnusedException " + eId + ". "); } } } } //remove selected users if (params.getStrings ("selectedUser") != null) { List removals = new ArrayList(Arrays.asList(params.getStrings ("selectedUser"))); state.setAttribute(STATE_SELECTED_USER_LIST, removals); for(int i = 0; i<removals.size(); i++) { String rEId = (String) removals.get(i); try { User user = UserDirectoryService.getUserByEid(rEId); Participant selected = new Participant(); selected.name = user.getDisplayName(); selected.uniqname = user.getId(); realmEdit.removeMember(user.getId()); } catch (UserNotDefinedException e) { M_log.warn(this + " IdUnusedException " + rEId + ". "); } } } String maintainRoleString = realmEdit.getMaintainRole(); if (realmEdit.getUsersHasRole(maintainRoleString).isEmpty()) { // if after update, there is no maintainer role user for the site, show alert message and don't save the update addAlert(state, rb.getString("sitegen.siteinfolist.nomaintainuser") + maintainRoleString + "."); } else { AuthzGroupService.save(realmEdit); } } catch (GroupNotDefinedException e) { addAlert(state, rb.getString("java.problem2")); M_log.warn(this + " IdUnusedException " + s.getTitle() + "(" + realmId + "). "); } catch(AuthzPermissionException e) { addAlert(state, rb.getString("java.changeroles")); M_log.warn(this + " PermissionException " + s.getTitle() + "(" + realmId + "). "); } } } // doUpdate_participant
54846 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54846/70b3f8bad2b35c1e312d39cc905d223c842e06c6/SiteAction.java/buggy/site-manage-tool/tool/src/java/org/sakaiproject/site/tool/SiteAction.java
try { User user = UserDirectoryService.getUserByEid(eId); realmEdit.addMember(user.getId(), roleId, activeGrant, fromProvider); } catch (UserNotDefinedException e) { M_log.warn(this + " IdUnusedException " + eId + ". "); }
realmEdit.addMember(id, roleId, activeGrant, fromProvider);
public void doUpdate_participant(RunData data) { SessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ()); ParameterParser params = data.getParameters (); Site s = getStateSite(state); String realmId = SiteService.siteReference(s.getId()); if (AuthzGroupService.allowUpdate(realmId) || SiteService.allowUpdateSiteMembership(s.getId())) { try { AuthzGroup realmEdit = AuthzGroupService.getAuthzGroup(realmId); // update participant roles List participants = (List) state.getAttribute(STATE_PARTICIPANT_LIST);; // remove all roles and then add back those that were checked for (int i=0; i<participants.size(); i++) { String eId = null; // added participant Object participant = (Object) participants.get(i); if (participant.getClass().equals(Participant.class)) { eId = ((Participant) participant).getUniqname(); } else if (participant.getClass().equals(CourseMember.class)) { // course member eId = ((CourseMember) participant).getUniqname(); } if (eId != null) { //get the newly assigned role String inputRoleField = "role" + eId; String roleId = params.getString(inputRoleField); // only change roles when they are different than before if (roleId!= null) { // get the grant active status boolean activeGrant = true; String activeGrantField = "activeGrant" + eId; if (params.getString(activeGrantField) != null) { activeGrant = params.getString(activeGrantField).equalsIgnoreCase("true")?true:false; } boolean fromProvider = false; if (participant.getClass().equals(CourseMember.class)) { if (roleId.equals(((CourseMember) participant).getProviderRole())) { fromProvider = true; } } try { User user = UserDirectoryService.getUserByEid(eId); realmEdit.addMember(user.getId(), roleId, activeGrant, fromProvider); } catch (UserNotDefinedException e) { M_log.warn(this + " IdUnusedException " + eId + ". "); } } } } //remove selected users if (params.getStrings ("selectedUser") != null) { List removals = new ArrayList(Arrays.asList(params.getStrings ("selectedUser"))); state.setAttribute(STATE_SELECTED_USER_LIST, removals); for(int i = 0; i<removals.size(); i++) { String rEId = (String) removals.get(i); try { User user = UserDirectoryService.getUserByEid(rEId); Participant selected = new Participant(); selected.name = user.getDisplayName(); selected.uniqname = user.getId(); realmEdit.removeMember(user.getId()); } catch (UserNotDefinedException e) { M_log.warn(this + " IdUnusedException " + rEId + ". "); } } } String maintainRoleString = realmEdit.getMaintainRole(); if (realmEdit.getUsersHasRole(maintainRoleString).isEmpty()) { // if after update, there is no maintainer role user for the site, show alert message and don't save the update addAlert(state, rb.getString("sitegen.siteinfolist.nomaintainuser") + maintainRoleString + "."); } else { AuthzGroupService.save(realmEdit); } } catch (GroupNotDefinedException e) { addAlert(state, rb.getString("java.problem2")); M_log.warn(this + " IdUnusedException " + s.getTitle() + "(" + realmId + "). "); } catch(AuthzPermissionException e) { addAlert(state, rb.getString("java.changeroles")); M_log.warn(this + " PermissionException " + s.getTitle() + "(" + realmId + "). "); } } } // doUpdate_participant
54846 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54846/70b3f8bad2b35c1e312d39cc905d223c842e06c6/SiteAction.java/buggy/site-manage-tool/tool/src/java/org/sakaiproject/site/tool/SiteAction.java
String rEId = (String) removals.get(i);
String rId = (String) removals.get(i);
public void doUpdate_participant(RunData data) { SessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ()); ParameterParser params = data.getParameters (); Site s = getStateSite(state); String realmId = SiteService.siteReference(s.getId()); if (AuthzGroupService.allowUpdate(realmId) || SiteService.allowUpdateSiteMembership(s.getId())) { try { AuthzGroup realmEdit = AuthzGroupService.getAuthzGroup(realmId); // update participant roles List participants = (List) state.getAttribute(STATE_PARTICIPANT_LIST);; // remove all roles and then add back those that were checked for (int i=0; i<participants.size(); i++) { String eId = null; // added participant Object participant = (Object) participants.get(i); if (participant.getClass().equals(Participant.class)) { eId = ((Participant) participant).getUniqname(); } else if (participant.getClass().equals(CourseMember.class)) { // course member eId = ((CourseMember) participant).getUniqname(); } if (eId != null) { //get the newly assigned role String inputRoleField = "role" + eId; String roleId = params.getString(inputRoleField); // only change roles when they are different than before if (roleId!= null) { // get the grant active status boolean activeGrant = true; String activeGrantField = "activeGrant" + eId; if (params.getString(activeGrantField) != null) { activeGrant = params.getString(activeGrantField).equalsIgnoreCase("true")?true:false; } boolean fromProvider = false; if (participant.getClass().equals(CourseMember.class)) { if (roleId.equals(((CourseMember) participant).getProviderRole())) { fromProvider = true; } } try { User user = UserDirectoryService.getUserByEid(eId); realmEdit.addMember(user.getId(), roleId, activeGrant, fromProvider); } catch (UserNotDefinedException e) { M_log.warn(this + " IdUnusedException " + eId + ". "); } } } } //remove selected users if (params.getStrings ("selectedUser") != null) { List removals = new ArrayList(Arrays.asList(params.getStrings ("selectedUser"))); state.setAttribute(STATE_SELECTED_USER_LIST, removals); for(int i = 0; i<removals.size(); i++) { String rEId = (String) removals.get(i); try { User user = UserDirectoryService.getUserByEid(rEId); Participant selected = new Participant(); selected.name = user.getDisplayName(); selected.uniqname = user.getId(); realmEdit.removeMember(user.getId()); } catch (UserNotDefinedException e) { M_log.warn(this + " IdUnusedException " + rEId + ". "); } } } String maintainRoleString = realmEdit.getMaintainRole(); if (realmEdit.getUsersHasRole(maintainRoleString).isEmpty()) { // if after update, there is no maintainer role user for the site, show alert message and don't save the update addAlert(state, rb.getString("sitegen.siteinfolist.nomaintainuser") + maintainRoleString + "."); } else { AuthzGroupService.save(realmEdit); } } catch (GroupNotDefinedException e) { addAlert(state, rb.getString("java.problem2")); M_log.warn(this + " IdUnusedException " + s.getTitle() + "(" + realmId + "). "); } catch(AuthzPermissionException e) { addAlert(state, rb.getString("java.changeroles")); M_log.warn(this + " PermissionException " + s.getTitle() + "(" + realmId + "). "); } } } // doUpdate_participant
54846 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54846/70b3f8bad2b35c1e312d39cc905d223c842e06c6/SiteAction.java/buggy/site-manage-tool/tool/src/java/org/sakaiproject/site/tool/SiteAction.java
User user = UserDirectoryService.getUserByEid(rEId);
User user = UserDirectoryService.getUser(rId);
public void doUpdate_participant(RunData data) { SessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ()); ParameterParser params = data.getParameters (); Site s = getStateSite(state); String realmId = SiteService.siteReference(s.getId()); if (AuthzGroupService.allowUpdate(realmId) || SiteService.allowUpdateSiteMembership(s.getId())) { try { AuthzGroup realmEdit = AuthzGroupService.getAuthzGroup(realmId); // update participant roles List participants = (List) state.getAttribute(STATE_PARTICIPANT_LIST);; // remove all roles and then add back those that were checked for (int i=0; i<participants.size(); i++) { String eId = null; // added participant Object participant = (Object) participants.get(i); if (participant.getClass().equals(Participant.class)) { eId = ((Participant) participant).getUniqname(); } else if (participant.getClass().equals(CourseMember.class)) { // course member eId = ((CourseMember) participant).getUniqname(); } if (eId != null) { //get the newly assigned role String inputRoleField = "role" + eId; String roleId = params.getString(inputRoleField); // only change roles when they are different than before if (roleId!= null) { // get the grant active status boolean activeGrant = true; String activeGrantField = "activeGrant" + eId; if (params.getString(activeGrantField) != null) { activeGrant = params.getString(activeGrantField).equalsIgnoreCase("true")?true:false; } boolean fromProvider = false; if (participant.getClass().equals(CourseMember.class)) { if (roleId.equals(((CourseMember) participant).getProviderRole())) { fromProvider = true; } } try { User user = UserDirectoryService.getUserByEid(eId); realmEdit.addMember(user.getId(), roleId, activeGrant, fromProvider); } catch (UserNotDefinedException e) { M_log.warn(this + " IdUnusedException " + eId + ". "); } } } } //remove selected users if (params.getStrings ("selectedUser") != null) { List removals = new ArrayList(Arrays.asList(params.getStrings ("selectedUser"))); state.setAttribute(STATE_SELECTED_USER_LIST, removals); for(int i = 0; i<removals.size(); i++) { String rEId = (String) removals.get(i); try { User user = UserDirectoryService.getUserByEid(rEId); Participant selected = new Participant(); selected.name = user.getDisplayName(); selected.uniqname = user.getId(); realmEdit.removeMember(user.getId()); } catch (UserNotDefinedException e) { M_log.warn(this + " IdUnusedException " + rEId + ". "); } } } String maintainRoleString = realmEdit.getMaintainRole(); if (realmEdit.getUsersHasRole(maintainRoleString).isEmpty()) { // if after update, there is no maintainer role user for the site, show alert message and don't save the update addAlert(state, rb.getString("sitegen.siteinfolist.nomaintainuser") + maintainRoleString + "."); } else { AuthzGroupService.save(realmEdit); } } catch (GroupNotDefinedException e) { addAlert(state, rb.getString("java.problem2")); M_log.warn(this + " IdUnusedException " + s.getTitle() + "(" + realmId + "). "); } catch(AuthzPermissionException e) { addAlert(state, rb.getString("java.changeroles")); M_log.warn(this + " PermissionException " + s.getTitle() + "(" + realmId + "). "); } } } // doUpdate_participant
54846 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54846/70b3f8bad2b35c1e312d39cc905d223c842e06c6/SiteAction.java/buggy/site-manage-tool/tool/src/java/org/sakaiproject/site/tool/SiteAction.java
M_log.warn(this + " IdUnusedException " + rEId + ". ");
M_log.warn(this + " IdUnusedException " + rId + ". ");
public void doUpdate_participant(RunData data) { SessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ()); ParameterParser params = data.getParameters (); Site s = getStateSite(state); String realmId = SiteService.siteReference(s.getId()); if (AuthzGroupService.allowUpdate(realmId) || SiteService.allowUpdateSiteMembership(s.getId())) { try { AuthzGroup realmEdit = AuthzGroupService.getAuthzGroup(realmId); // update participant roles List participants = (List) state.getAttribute(STATE_PARTICIPANT_LIST);; // remove all roles and then add back those that were checked for (int i=0; i<participants.size(); i++) { String eId = null; // added participant Object participant = (Object) participants.get(i); if (participant.getClass().equals(Participant.class)) { eId = ((Participant) participant).getUniqname(); } else if (participant.getClass().equals(CourseMember.class)) { // course member eId = ((CourseMember) participant).getUniqname(); } if (eId != null) { //get the newly assigned role String inputRoleField = "role" + eId; String roleId = params.getString(inputRoleField); // only change roles when they are different than before if (roleId!= null) { // get the grant active status boolean activeGrant = true; String activeGrantField = "activeGrant" + eId; if (params.getString(activeGrantField) != null) { activeGrant = params.getString(activeGrantField).equalsIgnoreCase("true")?true:false; } boolean fromProvider = false; if (participant.getClass().equals(CourseMember.class)) { if (roleId.equals(((CourseMember) participant).getProviderRole())) { fromProvider = true; } } try { User user = UserDirectoryService.getUserByEid(eId); realmEdit.addMember(user.getId(), roleId, activeGrant, fromProvider); } catch (UserNotDefinedException e) { M_log.warn(this + " IdUnusedException " + eId + ". "); } } } } //remove selected users if (params.getStrings ("selectedUser") != null) { List removals = new ArrayList(Arrays.asList(params.getStrings ("selectedUser"))); state.setAttribute(STATE_SELECTED_USER_LIST, removals); for(int i = 0; i<removals.size(); i++) { String rEId = (String) removals.get(i); try { User user = UserDirectoryService.getUserByEid(rEId); Participant selected = new Participant(); selected.name = user.getDisplayName(); selected.uniqname = user.getId(); realmEdit.removeMember(user.getId()); } catch (UserNotDefinedException e) { M_log.warn(this + " IdUnusedException " + rEId + ". "); } } } String maintainRoleString = realmEdit.getMaintainRole(); if (realmEdit.getUsersHasRole(maintainRoleString).isEmpty()) { // if after update, there is no maintainer role user for the site, show alert message and don't save the update addAlert(state, rb.getString("sitegen.siteinfolist.nomaintainuser") + maintainRoleString + "."); } else { AuthzGroupService.save(realmEdit); } } catch (GroupNotDefinedException e) { addAlert(state, rb.getString("java.problem2")); M_log.warn(this + " IdUnusedException " + s.getTitle() + "(" + realmId + "). "); } catch(AuthzPermissionException e) { addAlert(state, rb.getString("java.changeroles")); M_log.warn(this + " PermissionException " + s.getTitle() + "(" + realmId + "). "); } } } // doUpdate_participant
54846 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54846/70b3f8bad2b35c1e312d39cc905d223c842e06c6/SiteAction.java/buggy/site-manage-tool/tool/src/java/org/sakaiproject/site/tool/SiteAction.java
participants.add(member);
try { User user = UserDirectoryService.getUserByEid(memberUniqname); Participant participant = new Participant(); participant.name = user.getSortName(); participant.uniqname = user.getId(); participant.role = member.getRole(); participant.providerRole = member.getProviderRole(); participant.course = member.getCourse(); participant.section = member.getSection(); participant.credits = member.getCredits(); participant.regId = member.getId(); participant.removeable = false; participants.add(participant); } catch (UserNotDefinedException e) { }
private List getParticipantList(SessionState state) { List members = new Vector(); List participants = new Vector(); String realmId = SiteService.siteReference((String) state.getAttribute(STATE_SITE_INSTANCE_ID)); List providerCourseList = null; providerCourseList = getProviderCourseList(StringUtil.trimToNull(getExternalRealmId(state))); if (providerCourseList != null && providerCourseList.size() > 0) { state.setAttribute(SITE_PROVIDER_COURSE_LIST, providerCourseList); } if (providerCourseList != null) { for (int k = 0; k < providerCourseList.size(); k++) { String courseId = (String) providerCourseList.get(k); try { members.addAll(CourseManagementService.getCourseMembers(courseId)); } catch (Exception e) { // M_log.warn(this + " Cannot find course " + courseId); } } } try { AuthzGroup realm = AuthzGroupService.getAuthzGroup(realmId); Set grants = realm.getMembers(); //Collections.sort(users); for (Iterator i = grants.iterator(); i.hasNext();) { Member g = (Member) i.next(); String userString = g.getUserEid(); Role r = g.getRole(); boolean alreadyInList = false; for (Iterator p = members.iterator(); p.hasNext() && !alreadyInList;) { CourseMember member = (CourseMember) p.next(); String memberUniqname = member.getUniqname(); if (userString.equalsIgnoreCase(memberUniqname)) { alreadyInList = true; if (r != null) { member.setRole(r.getId()); } participants.add(member); } } if (!alreadyInList) { try { User user = UserDirectoryService.getUserByEid(userString); Participant participant = new Participant(); participant.name = user.getSortName(); participant.uniqname = user.getId(); if (r != null) { participant.role = r.getId(); } participants.add(participant); } catch (UserNotDefinedException e) { // deal with missing user quietly without throwing a warning message } } } } catch (GroupNotDefinedException e) { M_log.warn(this + " IdUnusedException " + realmId); } state.setAttribute(STATE_PARTICIPANT_LIST, participants); return participants; } // getParticipantList
54846 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54846/70b3f8bad2b35c1e312d39cc905d223c842e06c6/SiteAction.java/buggy/site-manage-tool/tool/src/java/org/sakaiproject/site/tool/SiteAction.java
if (listChangeListeners == null) { boolean hadListeners = hasListeners(); listChangeListeners = listener; if (!hadListeners) { firstListenerAdded(); } return; } Collection listenerList; if (listChangeListeners instanceof Collection) { listenerList = (Collection) listChangeListeners; } else { IListChangeListener l = (IListChangeListener) listChangeListeners; listenerList = new ArrayList(); listenerList.add(l); listChangeListeners = listenerList; } listenerList.add(listener);
addListener(ListChangeEvent.TYPE, listener);
public synchronized void addListChangeListener(IListChangeListener listener) { if (listChangeListeners == null) { boolean hadListeners = hasListeners(); listChangeListeners = listener; if (!hadListeners) { firstListenerAdded(); } return; } Collection listenerList; if (listChangeListeners instanceof Collection) { listenerList = (Collection) listChangeListeners; } else { IListChangeListener l = (IListChangeListener) listChangeListeners; listenerList = new ArrayList(); listenerList.add(l); listChangeListeners = listenerList; } listenerList.add(listener); }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/6aecdb31231a8602dbf72944625703c440949c78/ObservableList.java/clean/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/ObservableList.java
listChangeListeners = null;
public synchronized void dispose() { listChangeListeners = null; super.dispose(); }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/6aecdb31231a8602dbf72944625703c440949c78/ObservableList.java/clean/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/ObservableList.java
if (listChangeListeners == null) { return; } if (listChangeListeners instanceof IListChangeListener) { ((IListChangeListener) listChangeListeners).handleListChange(this, diff); return; } Collection changeListenerCollection = (Collection) listChangeListeners; IListChangeListener[] listeners = (IListChangeListener[]) (changeListenerCollection) .toArray(new IListChangeListener[changeListenerCollection.size()]); for (int i = 0; i < listeners.length; i++) { listeners[i].handleListChange(this, diff); }
fireEvent(new ListChangeEvent(this, diff));
protected void fireListChange(ListDiff diff) { // fire general change event first super.fireChange(); if (listChangeListeners == null) { return; } if (listChangeListeners instanceof IListChangeListener) { ((IListChangeListener) listChangeListeners).handleListChange(this, diff); return; } Collection changeListenerCollection = (Collection) listChangeListeners; IListChangeListener[] listeners = (IListChangeListener[]) (changeListenerCollection) .toArray(new IListChangeListener[changeListenerCollection.size()]); for (int i = 0; i < listeners.length; i++) { listeners[i].handleListChange(this, diff); } }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/6aecdb31231a8602dbf72944625703c440949c78/ObservableList.java/clean/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/ObservableList.java
if (listChangeListeners == listener) { listChangeListeners = null; if (!hasListeners()) { lastListenerRemoved(); } return; } if (listChangeListeners instanceof Collection) { Collection listenerList = (Collection) listChangeListeners; listenerList.remove(listener); if (listenerList.isEmpty()) { listChangeListeners = null; if (!hasListeners()) { lastListenerRemoved(); } } }
removeListener(ListChangeEvent.TYPE, listener);
public synchronized void removeListChangeListener(IListChangeListener listener) { if (listChangeListeners == listener) { listChangeListeners = null; if (!hasListeners()) { lastListenerRemoved(); } return; } if (listChangeListeners instanceof Collection) { Collection listenerList = (Collection) listChangeListeners; listenerList.remove(listener); if (listenerList.isEmpty()) { listChangeListeners = null; if (!hasListeners()) { lastListenerRemoved(); } } } }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/6aecdb31231a8602dbf72944625703c440949c78/ObservableList.java/clean/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/ObservableList.java
public static void addRosterEntry(
public static JSONObject addRosterEntry(
public static void addRosterEntry( HttpSession ses, String companyId, String emailAddress) throws PortalException, SystemException, XMPPException { Roster roster = getRoster(ses); User user = UserLocalServiceUtil.getUserByEmailAddress( companyId, emailAddress); String smackId = getXmppId(user); String name = user.getFullName(); roster.createEntry(smackId, name, null); }
57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/b7ef9a16a98b011fe24947015b232506e57bf6ff/MessagingUtil.java/buggy/portal-ejb/src/com/liferay/portlet/messaging/util/MessagingUtil.java
JSONObject jo = new JSONObject();
public static void addRosterEntry( HttpSession ses, String companyId, String emailAddress) throws PortalException, SystemException, XMPPException { Roster roster = getRoster(ses); User user = UserLocalServiceUtil.getUserByEmailAddress( companyId, emailAddress); String smackId = getXmppId(user); String name = user.getFullName(); roster.createEntry(smackId, name, null); }
57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/b7ef9a16a98b011fe24947015b232506e57bf6ff/MessagingUtil.java/buggy/portal-ejb/src/com/liferay/portlet/messaging/util/MessagingUtil.java
jo.put("name", name); jo.put("user", smackId); jo.put("status", "success"); return jo;
public static void addRosterEntry( HttpSession ses, String companyId, String emailAddress) throws PortalException, SystemException, XMPPException { Roster roster = getRoster(ses); User user = UserLocalServiceUtil.getUserByEmailAddress( companyId, emailAddress); String smackId = getXmppId(user); String name = user.getFullName(); roster.createEntry(smackId, name, null); }
57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/b7ef9a16a98b011fe24947015b232506e57bf6ff/MessagingUtil.java/buggy/portal-ejb/src/com/liferay/portlet/messaging/util/MessagingUtil.java
roster.setSubscriptionMode(Roster.SUBSCRIPTION_ACCEPT_ALL);
public static void createXMPPConnection(HttpSession ses, String userId) throws XMPPException { if (isJabberEnabled()) { XMPPConnection con = null; try { con = new XMPPConnection(SERVER_ADDRESS, SERVER_PORT); } catch (XMPPException e) { return; } try { con.login(userId, USER_PASSWORD, ses.getId()); } catch (XMPPException xmppe) { AccountManager accountManager = con.getAccountManager(); accountManager.createAccount(userId, USER_PASSWORD); con.close(); con = new XMPPConnection(SERVER_ADDRESS, SERVER_PORT); con.login(userId, USER_PASSWORD, ses.getId()); } PacketFilter filter = new PacketTypeFilter(Message.class); PacketCollector collector = con.createPacketCollector(filter); MessageListener msgListener = new MessageListener(ses); con.addPacketListener(msgListener, filter); Roster roster = con.getRoster(); roster.setSubscriptionMode(Roster.SUBSCRIPTION_ACCEPT_ALL); RosterUpdateListener rosterListener = new RosterUpdateListener(ses); roster.addRosterListener(rosterListener); JabberSession jabberSes = new JabberSession(); jabberSes.setConnection(con); jabberSes.setCollector(collector); jabberSes.setMessageListener(msgListener); jabberSes.setRoster(roster); jabberSes.setRosterListener(rosterListener); ses.setAttribute(WebKeys.JABBER_XMPP_SESSION, jabberSes); } }
57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/b7ef9a16a98b011fe24947015b232506e57bf6ff/MessagingUtil.java/buggy/portal-ejb/src/com/liferay/portlet/messaging/util/MessagingUtil.java
public void addAccount(AccountID id){ String acctString = id.toString(); addAccount(acctString); }
private void addAccount(AccountID id) { FIXMatcherEditor<String> matcherEditor = new FIXMatcherEditor<String>(Account.FIELD, id.toString(), id.getAccountNickname()); if (accountMatchers.indexOf(matcherEditor) < 0){ accountMatchers.add(matcherEditor); } }
public void addAccount(AccountID id){ String acctString = id.toString(); addAccount(acctString); }
52787 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52787/6a34478b554292b36701d7eaebf25a934e3abba0/FiltersView.java/clean/source/trunk/src/main/java/org/marketcetera/photon/views/FiltersView.java
String symbolString = symbol.toString(); addSymbol(symbolString);
FIXMatcherEditor<String> matcherEditor = new FIXMatcherEditor<String>(Symbol.FIELD, symbol.getBaseSymbol(), symbol.toString()); if (symbolMatchers.indexOf(matcherEditor) < 0){ symbolMatchers.add(matcherEditor); }
public void addSymbol(MSymbol symbol){ String symbolString = symbol.toString(); addSymbol(symbolString); }
52787 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52787/6a34478b554292b36701d7eaebf25a934e3abba0/FiltersView.java/clean/source/trunk/src/main/java/org/marketcetera/photon/views/FiltersView.java
accountMatchers.add(new FIXMatcherEditor<String>(Account.FIELD, "FOO", "FOO")); accountMatchers.add(new FIXMatcherEditor<String>(Account.FIELD, "QWER", "QWER"));
addAccount(new AccountID("FOO"));
private void initContent() { accountMatchers.add(new FIXMatcherEditor<String>(Account.FIELD, null, "<NO ACCOUNT>")); accountMatchers.add(new FIXMatcherEditor<String>(Account.FIELD, "FOO", "FOO")); accountMatchers.add(new FIXMatcherEditor<String>(Account.FIELD, "QWER", "QWER")); symbolMatchers.add(new FIXMatcherEditor<String>(Symbol.FIELD, null, "<NO SYMBOL>")); ordStatusMatcherEditor.getMatcherEditors().add(new FIXMatcherEditor<Character>(OrdStatus.FIELD, null, "Missing OrdStatus")); }
52787 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52787/6a34478b554292b36701d7eaebf25a934e3abba0/FiltersView.java/clean/source/trunk/src/main/java/org/marketcetera/photon/views/FiltersView.java
addSymbol(new MSymbol("BAR"));
private void initContent() { accountMatchers.add(new FIXMatcherEditor<String>(Account.FIELD, null, "<NO ACCOUNT>")); accountMatchers.add(new FIXMatcherEditor<String>(Account.FIELD, "FOO", "FOO")); accountMatchers.add(new FIXMatcherEditor<String>(Account.FIELD, "QWER", "QWER")); symbolMatchers.add(new FIXMatcherEditor<String>(Symbol.FIELD, null, "<NO SYMBOL>")); ordStatusMatcherEditor.getMatcherEditors().add(new FIXMatcherEditor<Character>(OrdStatus.FIELD, null, "Missing OrdStatus")); }
52787 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52787/6a34478b554292b36701d7eaebf25a934e3abba0/FiltersView.java/clean/source/trunk/src/main/java/org/marketcetera/photon/views/FiltersView.java
addAccount(accountString);
addAccount(new AccountID(accountString));
public void orderActionTaken(Message message) { try { String accountString = message.getString(Account.FIELD); addAccount(accountString); } catch (FieldNotFound e) { // do nothing } try { String symbolString = message.getString(Symbol.FIELD); addSymbol(symbolString); } catch (FieldNotFound e) { // do nothing } }
52787 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52787/6a34478b554292b36701d7eaebf25a934e3abba0/FiltersView.java/clean/source/trunk/src/main/java/org/marketcetera/photon/views/FiltersView.java
addSymbol(symbolString);
addSymbol(new MSymbol(symbolString));
public void orderActionTaken(Message message) { try { String accountString = message.getString(Account.FIELD); addAccount(accountString); } catch (FieldNotFound e) { // do nothing } try { String symbolString = message.getString(Symbol.FIELD); addSymbol(symbolString); } catch (FieldNotFound e) { // do nothing } }
52787 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52787/6a34478b554292b36701d7eaebf25a934e3abba0/FiltersView.java/clean/source/trunk/src/main/java/org/marketcetera/photon/views/FiltersView.java
return InternalPlatform.getDefault().getAdapterManager().getAdapter(this, adapter);
return Platform.getAdapterManager().getAdapter(this, adapter);
public Object getAdapter(Class adapter) { if (adapter == IWorkingSet.class || adapter == IPersistableElement.class) { return this; } return InternalPlatform.getDefault().getAdapterManager().getAdapter(this, adapter); }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/1eecb4cb6d1d8d20a6085ebf7bf7f7c3b8a0d31c/WorkingSet.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkingSet.java
protected void fillCoolBar(ICoolBarManager coolBar) { IToolBarManager toolBar = new ToolBarManager(SWT.FLAT | SWT.TRAIL); coolBar.add(new ToolBarContributionItem(toolBar, "standard")); //ActionContributionItem viewSecurityCI = new ActionContributionItem(viewSecurityAction); //toolBar.add(viewSecurityCI); ActionContributionItem focusCommandCI = new ActionContributionItem(focusCommandAction); toolBar.add(focusCommandCI); ActionContributionItem reconnectJMSCI = new ActionContributionItem(reconnectJMSAction); toolBar.add(reconnectJMSCI); }
52787 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52787/7afe71d84458a2ffe38e68abe421913f2cfbd24a/ApplicationActionBarAdvisor.java/buggy/source/trunk/plugins/org.marketcetera.photon/src/main/java/org/marketcetera/photon/ApplicationActionBarAdvisor.java
menu.add(new Separator()); preferencesAction = ActionFactory.PREFERENCES.create(window); menu.add(preferencesAction);
if (!PhotonConstants.isOSX){ menu.add(new Separator()); menu.add(preferencesAction); }
protected void fillMenuBar(IMenuManager menuBar) { // File menu MenuManager menu = new MenuManager( Messages.ApplicationActionBarAdvisor_FileMenuName); menu.add(reconnectJMSAction); menu.add(new Separator()); menu.add(saveAction); menu.add(new Separator()); menu.add(closeAllAction); menu.add(closeAction); menu.add(new Separator()); menu.add(quitAction); menuBar.add(menu); // Edit menu menu = new MenuManager( Messages.ApplicationActionBarAdvisor_EditMenuName); menu.add(undoAction); menu.add(redoAction); menu.add(new Separator()); menu.add(cutAction); menu.add(copyAction); menu.add(create); menu.add(new Separator()); menu.add(deleteAction); menu.add(selectAllAction); menu.add(findAction); menu.add(new Separator()); preferencesAction = ActionFactory.PREFERENCES.create(window); menu.add(preferencesAction); menuBar.add(menu); // Script menu menu = new MenuManager( Messages.ApplicationActionBarAdvisor_ScriptMenuName, Messages.ApplicationActionBarAdvisor_ScriptMenuID); menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS)); //agl necessary since the RunScript action is contributed as an editorContribution (see plugin.xml) menuBar.add(menu); // Contributions to the top-level menu menuBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS)); // Window menu menu = new MenuManager( Messages.ApplicationActionBarAdvisor_WindowMenuName, IWorkbenchActionConstants.M_WINDOW); //menu.add(viewSecurityAction); menu.add(new Separator()); menu.add(openNewWindowAction); menu.add(newEditorAction); menu.add(new Separator()); MenuManager perspectiveMenu = new MenuManager( Messages.ApplicationActionBarAdvisor_OpenPerspectiveMenuName, Messages.ApplicationActionBarAdvisor_OpenPerspectiveMenuID); perspectiveList.update(); perspectiveMenu.add(perspectiveList); menu.add(perspectiveMenu); MenuManager viewMenu = new MenuManager( Messages.ApplicationActionBarAdvisor_OpenViewMenuItemName, IWorkbenchActionConstants.M_VIEW); viewMenu.add(viewList); menu.add(viewMenu); menu.add(new Separator()); menu.add(savePerspectiveAction); menu.add(resetPerspectiveAction); menu.add(closePerspectiveAction); menu.add(closeAllPerspectivesAction); menu.add(new Separator()); MenuManager subMenu = new MenuManager( Messages.ApplicationActionBarAdvisor_NavigationMenuName, IWorkbenchActionConstants.M_NAVIGATE); subMenu.add(maximizeAction); subMenu.add(minimizeAction); subMenu.add(new Separator()); subMenu.add(activateEditorAction); subMenu.add(nextEditorAction); subMenu.add(previousEditorAction); subMenu.add(showEditorAction); subMenu.add(new Separator()); subMenu.add(nextPerspectiveAction); subMenu.add(previousPerspectiveAction); menu.add(subMenu); menu.add(viewMenu); menu.add(new Separator(IWorkbenchActionConstants.WINDOW_EXT)); menuBar.add(menu); // Help menu menu = new MenuManager( Messages.ApplicationActionBarAdvisor_HelpMenuName); menu.add(webHelpAction);// menu.add(helpContentsAction);// menu.add(helpSearchAction);// menu.add(dynamicHelpAction); menu.add(new Separator()); menu.add(checkForUpdatesAction); menu.add(new Separator()); menu.add(aboutAction); menuBar.add(menu); }
52787 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52787/7afe71d84458a2ffe38e68abe421913f2cfbd24a/ApplicationActionBarAdvisor.java/buggy/source/trunk/plugins/org.marketcetera.photon/src/main/java/org/marketcetera/photon/ApplicationActionBarAdvisor.java
menu.add(new Separator()); menu.add(aboutAction);
if (!PhotonConstants.isOSX){ menu.add(new Separator()); menu.add(aboutAction); }
protected void fillMenuBar(IMenuManager menuBar) { // File menu MenuManager menu = new MenuManager( Messages.ApplicationActionBarAdvisor_FileMenuName); menu.add(reconnectJMSAction); menu.add(new Separator()); menu.add(saveAction); menu.add(new Separator()); menu.add(closeAllAction); menu.add(closeAction); menu.add(new Separator()); menu.add(quitAction); menuBar.add(menu); // Edit menu menu = new MenuManager( Messages.ApplicationActionBarAdvisor_EditMenuName); menu.add(undoAction); menu.add(redoAction); menu.add(new Separator()); menu.add(cutAction); menu.add(copyAction); menu.add(create); menu.add(new Separator()); menu.add(deleteAction); menu.add(selectAllAction); menu.add(findAction); menu.add(new Separator()); preferencesAction = ActionFactory.PREFERENCES.create(window); menu.add(preferencesAction); menuBar.add(menu); // Script menu menu = new MenuManager( Messages.ApplicationActionBarAdvisor_ScriptMenuName, Messages.ApplicationActionBarAdvisor_ScriptMenuID); menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS)); //agl necessary since the RunScript action is contributed as an editorContribution (see plugin.xml) menuBar.add(menu); // Contributions to the top-level menu menuBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS)); // Window menu menu = new MenuManager( Messages.ApplicationActionBarAdvisor_WindowMenuName, IWorkbenchActionConstants.M_WINDOW); //menu.add(viewSecurityAction); menu.add(new Separator()); menu.add(openNewWindowAction); menu.add(newEditorAction); menu.add(new Separator()); MenuManager perspectiveMenu = new MenuManager( Messages.ApplicationActionBarAdvisor_OpenPerspectiveMenuName, Messages.ApplicationActionBarAdvisor_OpenPerspectiveMenuID); perspectiveList.update(); perspectiveMenu.add(perspectiveList); menu.add(perspectiveMenu); MenuManager viewMenu = new MenuManager( Messages.ApplicationActionBarAdvisor_OpenViewMenuItemName, IWorkbenchActionConstants.M_VIEW); viewMenu.add(viewList); menu.add(viewMenu); menu.add(new Separator()); menu.add(savePerspectiveAction); menu.add(resetPerspectiveAction); menu.add(closePerspectiveAction); menu.add(closeAllPerspectivesAction); menu.add(new Separator()); MenuManager subMenu = new MenuManager( Messages.ApplicationActionBarAdvisor_NavigationMenuName, IWorkbenchActionConstants.M_NAVIGATE); subMenu.add(maximizeAction); subMenu.add(minimizeAction); subMenu.add(new Separator()); subMenu.add(activateEditorAction); subMenu.add(nextEditorAction); subMenu.add(previousEditorAction); subMenu.add(showEditorAction); subMenu.add(new Separator()); subMenu.add(nextPerspectiveAction); subMenu.add(previousPerspectiveAction); menu.add(subMenu); menu.add(viewMenu); menu.add(new Separator(IWorkbenchActionConstants.WINDOW_EXT)); menuBar.add(menu); // Help menu menu = new MenuManager( Messages.ApplicationActionBarAdvisor_HelpMenuName); menu.add(webHelpAction);// menu.add(helpContentsAction);// menu.add(helpSearchAction);// menu.add(dynamicHelpAction); menu.add(new Separator()); menu.add(checkForUpdatesAction); menu.add(new Separator()); menu.add(aboutAction); menuBar.add(menu); }
52787 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52787/7afe71d84458a2ffe38e68abe421913f2cfbd24a/ApplicationActionBarAdvisor.java/buggy/source/trunk/plugins/org.marketcetera.photon/src/main/java/org/marketcetera/photon/ApplicationActionBarAdvisor.java
preferencesAction = ActionFactory.PREFERENCES.create(window); register(preferencesAction);
protected void makeActions(IWorkbenchWindow window) { this.window = window; commandStatusLineContribution = new CommandStatusLineContribution(CommandStatusLineContribution.ID); jmsStatusLineContribution = new FeedStatusLineContribution("jmsStatus", new String[] {"jms"}); //Application.getJMSConnector().addFeedComponentListener(jmsStatusLineContribution); IQuoteFeed quoteFeed = PhotonPlugin.getDefault().getQuoteFeed(); String quoteFeedID = "Quote Feed"; if (quoteFeed != null) quoteFeedID = quoteFeed.getID(); quoteFeedStatusLineContribution = new FeedStatusLineContribution("quoteFeedStatus", new String[] {quoteFeedID }); if (quoteFeed != null) quoteFeed.addFeedComponentListener(quoteFeedStatusLineContribution); saveAction = ActionFactory.SAVE.create(window); register(saveAction); closeAllAction = ActionFactory.CLOSE_ALL.create(window); register(closeAllAction); closeAction = ActionFactory.CLOSE.create(window); register(closeAction); quitAction = ActionFactory.QUIT.create(window); register(quitAction); undoAction = ActionFactory.UNDO.create(window); register(undoAction); redoAction = ActionFactory.REDO.create(window); register(redoAction); cutAction = ActionFactory.CUT.create(window); register(cutAction); copyAction = ActionFactory.COPY.create(window); register(copyAction); create = ActionFactory.PASTE.create(window); register(create); deleteAction = ActionFactory.DELETE.create(window); register(deleteAction); selectAllAction = ActionFactory.SELECT_ALL.create(window); register(selectAllAction); findAction = ActionFactory.FIND.create(window); register(findAction); openNewWindowAction = ActionFactory.OPEN_NEW_WINDOW.create(window); register(openNewWindowAction); newEditorAction = ActionFactory.NEW_EDITOR.create(window); register(newEditorAction); perspectiveList = ContributionItemFactory.PERSPECTIVES_SHORTLIST .create(window); viewList = ContributionItemFactory.VIEWS_SHORTLIST.create(window); savePerspectiveAction = ActionFactory.SAVE_PERSPECTIVE.create(window); register(savePerspectiveAction); resetPerspectiveAction = ActionFactory.RESET_PERSPECTIVE.create(window); register(resetPerspectiveAction); closePerspectiveAction = ActionFactory.CLOSE_PERSPECTIVE.create(window); register(closePerspectiveAction); closeAllPerspectivesAction = ActionFactory.CLOSE_ALL_PERSPECTIVES .create(window); register(closeAllPerspectivesAction); maximizeAction = ActionFactory.MAXIMIZE.create(window); register(maximizeAction); minimizeAction = ActionFactory.MINIMIZE.create(window); register(minimizeAction); activateEditorAction = ActionFactory.ACTIVATE_EDITOR.create(window); register(activateEditorAction); nextEditorAction = ActionFactory.NEXT_EDITOR.create(window); register(nextEditorAction); previousEditorAction = ActionFactory.PREVIOUS_EDITOR.create(window); register(previousEditorAction); showEditorAction = ActionFactory.SHOW_EDITOR.create(window); register(showEditorAction); nextPerspectiveAction = ActionFactory.NEXT_PERSPECTIVE.create(window); register(nextPerspectiveAction); previousPerspectiveAction = ActionFactory.PREVIOUS_PERSPECTIVE .create(window); register(previousPerspectiveAction); webHelpAction = new WebHelpAction(window); register(webHelpAction);// helpContentsAction = ActionFactory.HELP_CONTENTS.create(window); register(helpContentsAction);// helpSearchAction = ActionFactory.HELP_SEARCH.create(window); register(helpSearchAction);// dynamicHelpAction = ActionFactory.DYNAMIC_HELP.create(window); register(dynamicHelpAction); checkForUpdatesAction = new CheckForUpdatesAction(window); register(checkForUpdatesAction); aboutAction = ActionFactory.ABOUT.create(window); register(aboutAction); reconnectJMSAction = new ReconnectJMSAction(window); register(reconnectJMSAction); //viewSecurityAction = new ViewSecurityAction(window); focusCommandAction = new FocusCommandAction(window, commandStatusLineContribution); register(focusCommandAction); }
52787 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52787/7afe71d84458a2ffe38e68abe421913f2cfbd24a/ApplicationActionBarAdvisor.java/buggy/source/trunk/plugins/org.marketcetera.photon/src/main/java/org/marketcetera/photon/ApplicationActionBarAdvisor.java
rubyObj = RubyBoolean.newBoolean(runtime, true);
rubyObj = runtime.getTrue();
private IRubyObject unmarshalObjectDirectly(int type, IRubyObject proc) throws IOException { IRubyObject rubyObj = null; switch (type) { case '0' : rubyObj = runtime.getNil(); break; case 'T' : rubyObj = RubyBoolean.newBoolean(runtime, true); break; case 'F' : rubyObj = RubyBoolean.newBoolean(runtime, false); break; case '"' : rubyObj = RubyString.unmarshalFrom(this); break; case 'i' : rubyObj = RubyFixnum.unmarshalFrom(this); break; case 'f' : rubyObj = RubyFloat.unmarshalFrom(this); break; case ':' : rubyObj = RubySymbol.unmarshalFrom(this); break; case '[' : rubyObj = RubyArray.unmarshalFrom(this); break; case '{' : rubyObj = RubyHash.unmarshalFrom(this); break; case 'c' : rubyObj = RubyClass.unmarshalFrom(this); break; case 'm' : rubyObj = RubyModule.unmarshalFrom(this); break; case 'l' : rubyObj = RubyBignum.unmarshalFrom(this); break; case 'S' : rubyObj = RubyStruct.unmarshalFrom(this); break; case 'o' : rubyObj = defaultObjectUnmarshal(proc); break; case 'u' : rubyObj = userUnmarshal(); break; default : throw new ArgumentError(getRuntime(), "dump format error(" + type + ")"); } if (proc != null) { proc.callMethod("call", new IRubyObject[] {rubyObj}); } return rubyObj; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/870e1da9b41bfdbae259e1fc5f18fc8b76686998/UnmarshalStream.java/clean/src/org/jruby/runtime/marshal/UnmarshalStream.java
rubyObj = RubyBoolean.newBoolean(runtime, false);
rubyObj = runtime.getFalse();
private IRubyObject unmarshalObjectDirectly(int type, IRubyObject proc) throws IOException { IRubyObject rubyObj = null; switch (type) { case '0' : rubyObj = runtime.getNil(); break; case 'T' : rubyObj = RubyBoolean.newBoolean(runtime, true); break; case 'F' : rubyObj = RubyBoolean.newBoolean(runtime, false); break; case '"' : rubyObj = RubyString.unmarshalFrom(this); break; case 'i' : rubyObj = RubyFixnum.unmarshalFrom(this); break; case 'f' : rubyObj = RubyFloat.unmarshalFrom(this); break; case ':' : rubyObj = RubySymbol.unmarshalFrom(this); break; case '[' : rubyObj = RubyArray.unmarshalFrom(this); break; case '{' : rubyObj = RubyHash.unmarshalFrom(this); break; case 'c' : rubyObj = RubyClass.unmarshalFrom(this); break; case 'm' : rubyObj = RubyModule.unmarshalFrom(this); break; case 'l' : rubyObj = RubyBignum.unmarshalFrom(this); break; case 'S' : rubyObj = RubyStruct.unmarshalFrom(this); break; case 'o' : rubyObj = defaultObjectUnmarshal(proc); break; case 'u' : rubyObj = userUnmarshal(); break; default : throw new ArgumentError(getRuntime(), "dump format error(" + type + ")"); } if (proc != null) { proc.callMethod("call", new IRubyObject[] {rubyObj}); } return rubyObj; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/870e1da9b41bfdbae259e1fc5f18fc8b76686998/UnmarshalStream.java/clean/src/org/jruby/runtime/marshal/UnmarshalStream.java
throw new ArgumentError(getRuntime(), "dump format error(" + type + ")");
throw getRuntime().newArgumentError("dump format error(" + type + ")");
private IRubyObject unmarshalObjectDirectly(int type, IRubyObject proc) throws IOException { IRubyObject rubyObj = null; switch (type) { case '0' : rubyObj = runtime.getNil(); break; case 'T' : rubyObj = RubyBoolean.newBoolean(runtime, true); break; case 'F' : rubyObj = RubyBoolean.newBoolean(runtime, false); break; case '"' : rubyObj = RubyString.unmarshalFrom(this); break; case 'i' : rubyObj = RubyFixnum.unmarshalFrom(this); break; case 'f' : rubyObj = RubyFloat.unmarshalFrom(this); break; case ':' : rubyObj = RubySymbol.unmarshalFrom(this); break; case '[' : rubyObj = RubyArray.unmarshalFrom(this); break; case '{' : rubyObj = RubyHash.unmarshalFrom(this); break; case 'c' : rubyObj = RubyClass.unmarshalFrom(this); break; case 'm' : rubyObj = RubyModule.unmarshalFrom(this); break; case 'l' : rubyObj = RubyBignum.unmarshalFrom(this); break; case 'S' : rubyObj = RubyStruct.unmarshalFrom(this); break; case 'o' : rubyObj = defaultObjectUnmarshal(proc); break; case 'u' : rubyObj = userUnmarshal(); break; default : throw new ArgumentError(getRuntime(), "dump format error(" + type + ")"); } if (proc != null) { proc.callMethod("call", new IRubyObject[] {rubyObj}); } return rubyObj; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/870e1da9b41bfdbae259e1fc5f18fc8b76686998/UnmarshalStream.java/clean/src/org/jruby/runtime/marshal/UnmarshalStream.java
RubyString.newString(runtime, marshaled));
runtime.newString(marshaled));
private IRubyObject userUnmarshal() throws IOException { String className = unmarshalObject().asSymbol(); String marshaled = unmarshalString(); RubyModule classInstance = runtime.getModule(className); IRubyObject result = classInstance.callMethod( "_load", RubyString.newString(runtime, marshaled)); registerLinkTarget(result); return result; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/870e1da9b41bfdbae259e1fc5f18fc8b76686998/UnmarshalStream.java/clean/src/org/jruby/runtime/marshal/UnmarshalStream.java
String categoryId, String topicId, String messageId,
String categoryId, String messageId,
public void addMessageResources( String categoryId, String topicId, String messageId, boolean addCommunityPermissions, boolean addGuestPermissions) throws PortalException, SystemException { MBCategory category = MBCategoryUtil.findByPrimaryKey(categoryId); MBMessage message = MBMessageUtil.findByPrimaryKey( new MBMessagePK(topicId, messageId)); addMessageResources( category, message, addCommunityPermissions, addGuestPermissions); }
57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/d6b02fdb73be07a1fc7332713e89293b3822dfb8/MBMessageLocalServiceImpl.java/clean/portal-ejb/src/com/liferay/portlet/messageboards/service/impl/MBMessageLocalServiceImpl.java
new MBMessagePK(topicId, messageId));
new MBMessagePK(MBMessage.DEPRECATED_TOPIC_ID, messageId));
public void addMessageResources( String categoryId, String topicId, String messageId, boolean addCommunityPermissions, boolean addGuestPermissions) throws PortalException, SystemException { MBCategory category = MBCategoryUtil.findByPrimaryKey(categoryId); MBMessage message = MBMessageUtil.findByPrimaryKey( new MBMessagePK(topicId, messageId)); addMessageResources( category, message, addCommunityPermissions, addGuestPermissions); }
57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/d6b02fdb73be07a1fc7332713e89293b3822dfb8/MBMessageLocalServiceImpl.java/clean/portal-ejb/src/com/liferay/portlet/messageboards/service/impl/MBMessageLocalServiceImpl.java
public void deleteDiscussionMessage(String topicId, String messageId)
public void deleteDiscussionMessage(String messageId)
public void deleteDiscussionMessage(String topicId, String messageId) throws PortalException, SystemException { deleteMessage(topicId, messageId); }
57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/d6b02fdb73be07a1fc7332713e89293b3822dfb8/MBMessageLocalServiceImpl.java/clean/portal-ejb/src/com/liferay/portlet/messageboards/service/impl/MBMessageLocalServiceImpl.java
deleteMessage(topicId, messageId);
deleteMessage(messageId);
public void deleteDiscussionMessage(String topicId, String messageId) throws PortalException, SystemException { deleteMessage(topicId, messageId); }
57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/d6b02fdb73be07a1fc7332713e89293b3822dfb8/MBMessageLocalServiceImpl.java/clean/portal-ejb/src/com/liferay/portlet/messageboards/service/impl/MBMessageLocalServiceImpl.java
deleteMessage(message.getTopicId(), message.getMessageId());
deleteMessage(message.getMessageId());
public void deleteDiscussionMessages(String className, String classPK) throws PortalException, SystemException { try { MBDiscussion discussion = MBDiscussionUtil.findByC_C(className, classPK); List messages = MBMessageUtil.findByT_P( discussion.getThreadId(), MBMessage.DEFAULT_PARENT_MESSAGE_ID); MBMessage message = (MBMessage)messages.get(0); deleteMessage(message.getTopicId(), message.getMessageId()); MBDiscussionUtil.remove(discussion.getDiscussionId()); } catch (NoSuchDiscussionException nsde) { } }
57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/d6b02fdb73be07a1fc7332713e89293b3822dfb8/MBMessageLocalServiceImpl.java/clean/portal-ejb/src/com/liferay/portlet/messageboards/service/impl/MBMessageLocalServiceImpl.java
public void deleteMessage(String topicId, String messageId)
public void deleteMessage(String messageId)
public void deleteMessage(String topicId, String messageId) throws PortalException, SystemException { MBMessage message = MBMessageUtil.findByPrimaryKey( new MBMessagePK(topicId, messageId)); deleteMessage(message); }
57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/d6b02fdb73be07a1fc7332713e89293b3822dfb8/MBMessageLocalServiceImpl.java/clean/portal-ejb/src/com/liferay/portlet/messageboards/service/impl/MBMessageLocalServiceImpl.java
new MBMessagePK(topicId, messageId));
new MBMessagePK(MBMessage.DEPRECATED_TOPIC_ID, messageId));
public void deleteMessage(String topicId, String messageId) throws PortalException, SystemException { MBMessage message = MBMessageUtil.findByPrimaryKey( new MBMessagePK(topicId, messageId)); deleteMessage(message); }
57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/d6b02fdb73be07a1fc7332713e89293b3822dfb8/MBMessageLocalServiceImpl.java/clean/portal-ejb/src/com/liferay/portlet/messageboards/service/impl/MBMessageLocalServiceImpl.java
public MBMessage getMessage(String topicId, String messageId)
public MBMessage getMessage(String messageId)
public MBMessage getMessage(String topicId, String messageId) throws PortalException, SystemException { return MBMessageUtil.findByPrimaryKey( new MBMessagePK(topicId, messageId)); }
57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/d6b02fdb73be07a1fc7332713e89293b3822dfb8/MBMessageLocalServiceImpl.java/clean/portal-ejb/src/com/liferay/portlet/messageboards/service/impl/MBMessageLocalServiceImpl.java
new MBMessagePK(topicId, messageId));
new MBMessagePK(MBMessage.DEPRECATED_TOPIC_ID, messageId));
public MBMessage getMessage(String topicId, String messageId) throws PortalException, SystemException { return MBMessageUtil.findByPrimaryKey( new MBMessagePK(topicId, messageId)); }
57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/d6b02fdb73be07a1fc7332713e89293b3822dfb8/MBMessageLocalServiceImpl.java/clean/portal-ejb/src/com/liferay/portlet/messageboards/service/impl/MBMessageLocalServiceImpl.java
public MBMessageDisplay getMessageDisplay( String topicId, String messageId, String userId)
public MBMessageDisplay getMessageDisplay(String messageId, String userId)
public MBMessageDisplay getMessageDisplay( String topicId, String messageId, String userId) throws PortalException, SystemException { MBMessage message = getMessage(topicId, messageId); return getMessageDisplay(message, userId); }
57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/d6b02fdb73be07a1fc7332713e89293b3822dfb8/MBMessageLocalServiceImpl.java/clean/portal-ejb/src/com/liferay/portlet/messageboards/service/impl/MBMessageLocalServiceImpl.java
MBMessage message = getMessage(topicId, messageId);
MBMessage message = getMessage(messageId);
public MBMessageDisplay getMessageDisplay( String topicId, String messageId, String userId) throws PortalException, SystemException { MBMessage message = getMessage(topicId, messageId); return getMessageDisplay(message, userId); }
57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/d6b02fdb73be07a1fc7332713e89293b3822dfb8/MBMessageLocalServiceImpl.java/clean/portal-ejb/src/com/liferay/portlet/messageboards/service/impl/MBMessageLocalServiceImpl.java
public void subscribeMessage( String userId, String topicId, String messageId)
public void subscribeMessage(String userId, String messageId)
public void subscribeMessage( String userId, String topicId, String messageId) throws PortalException, SystemException { MBMessage message = MBMessageUtil.findByPrimaryKey( new MBMessagePK(topicId, messageId)); SubscriptionLocalServiceUtil.addSubscription( userId, MBThread.class.getName(), message.getThreadId()); }
57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/d6b02fdb73be07a1fc7332713e89293b3822dfb8/MBMessageLocalServiceImpl.java/clean/portal-ejb/src/com/liferay/portlet/messageboards/service/impl/MBMessageLocalServiceImpl.java
new MBMessagePK(topicId, messageId));
new MBMessagePK(MBMessage.DEPRECATED_TOPIC_ID, messageId));
public void subscribeMessage( String userId, String topicId, String messageId) throws PortalException, SystemException { MBMessage message = MBMessageUtil.findByPrimaryKey( new MBMessagePK(topicId, messageId)); SubscriptionLocalServiceUtil.addSubscription( userId, MBThread.class.getName(), message.getThreadId()); }
57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/d6b02fdb73be07a1fc7332713e89293b3822dfb8/MBMessageLocalServiceImpl.java/clean/portal-ejb/src/com/liferay/portlet/messageboards/service/impl/MBMessageLocalServiceImpl.java
public void unsubscribeMessage( String userId, String topicId, String messageId)
public void unsubscribeMessage(String userId, String messageId)
public void unsubscribeMessage( String userId, String topicId, String messageId) throws PortalException, SystemException { MBMessage message = MBMessageUtil.findByPrimaryKey( new MBMessagePK(topicId, messageId)); SubscriptionLocalServiceUtil.deleteSubscription( userId, MBThread.class.getName(), message.getThreadId()); }
57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/d6b02fdb73be07a1fc7332713e89293b3822dfb8/MBMessageLocalServiceImpl.java/clean/portal-ejb/src/com/liferay/portlet/messageboards/service/impl/MBMessageLocalServiceImpl.java
new MBMessagePK(topicId, messageId));
new MBMessagePK(MBMessage.DEPRECATED_TOPIC_ID, messageId));
public void unsubscribeMessage( String userId, String topicId, String messageId) throws PortalException, SystemException { MBMessage message = MBMessageUtil.findByPrimaryKey( new MBMessagePK(topicId, messageId)); SubscriptionLocalServiceUtil.deleteSubscription( userId, MBThread.class.getName(), message.getThreadId()); }
57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/d6b02fdb73be07a1fc7332713e89293b3822dfb8/MBMessageLocalServiceImpl.java/clean/portal-ejb/src/com/liferay/portlet/messageboards/service/impl/MBMessageLocalServiceImpl.java
String topicId, String messageId, String subject, String body)
String messageId, String subject, String body)
public MBMessage updateDiscussionMessage( String topicId, String messageId, String subject, String body) throws PortalException, SystemException { String categoryId = Company.SYSTEM; List files = new ArrayList(); PortletPreferences prefs = null; return updateMessage( topicId, messageId, categoryId, subject, body, files, prefs); }
57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/d6b02fdb73be07a1fc7332713e89293b3822dfb8/MBMessageLocalServiceImpl.java/clean/portal-ejb/src/com/liferay/portlet/messageboards/service/impl/MBMessageLocalServiceImpl.java
topicId, messageId, categoryId, subject, body, files, prefs);
messageId, categoryId, subject, body, files, prefs);
public MBMessage updateDiscussionMessage( String topicId, String messageId, String subject, String body) throws PortalException, SystemException { String categoryId = Company.SYSTEM; List files = new ArrayList(); PortletPreferences prefs = null; return updateMessage( topicId, messageId, categoryId, subject, body, files, prefs); }
57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/d6b02fdb73be07a1fc7332713e89293b3822dfb8/MBMessageLocalServiceImpl.java/clean/portal-ejb/src/com/liferay/portlet/messageboards/service/impl/MBMessageLocalServiceImpl.java
String topicId, String messageId, String categoryId, String subject, String body, List files, PortletPreferences prefs)
String messageId, String categoryId, String subject, String body, List files, PortletPreferences prefs)
public MBMessage updateMessage( String topicId, String messageId, String categoryId, String subject, String body, List files, PortletPreferences prefs) throws PortalException, SystemException { // Message MBCategory category = MBCategoryUtil.findByPrimaryKey(categoryId); Date now = new Date(); validate(subject, body); MBMessage message = MBMessageUtil.findByPrimaryKey( new MBMessagePK(topicId, messageId)); // File attachments if (files.size() > 0) { String companyId = message.getCompanyId(); String portletId = Company.SYSTEM; String groupId = Group.DEFAULT_PARENT_GROUP_ID; String repositoryId = Company.SYSTEM; String dirName = message.getAttachmentsDir(); try { DLServiceUtil.deleteDirectory( companyId, portletId, repositoryId, dirName); } catch (NoSuchDirectoryException nsde) { } DLServiceUtil.addDirectory(companyId, repositoryId, dirName); for (int i = 0; i < files.size(); i++) { ObjectValuePair ovp = (ObjectValuePair)files.get(i); String fileName = (String)ovp.getKey(); byte[] byteArray = (byte[])ovp.getValue(); try { DLServiceUtil.addFile( companyId, portletId, groupId, repositoryId, dirName + "/" + fileName, byteArray); } catch (DuplicateFileException dfe) { } } } // Message message.setModifiedDate(now); message.setSubject(subject); message.setBody(body); message.setAttachments((files.size() > 0 ? true : false)); MBMessageUtil.update(message); // Subscriptions notifySubscribers(message, prefs, true); // Category category.setLastPostDate(now); MBCategoryUtil.update(category); // Lucene try { if (!category.isDiscussion()) { Indexer.updateMessage( message.getCompanyId(), category.getGroupId(), category.getCategoryId(), message.getTopicId(), message.getThreadId(), messageId, subject, body); } } catch (IOException ioe) { _log.error(ioe.getMessage()); } return message; }
57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/d6b02fdb73be07a1fc7332713e89293b3822dfb8/MBMessageLocalServiceImpl.java/clean/portal-ejb/src/com/liferay/portlet/messageboards/service/impl/MBMessageLocalServiceImpl.java
new MBMessagePK(topicId, messageId));
new MBMessagePK(MBMessage.DEPRECATED_TOPIC_ID, messageId));
public MBMessage updateMessage( String topicId, String messageId, String categoryId, String subject, String body, List files, PortletPreferences prefs) throws PortalException, SystemException { // Message MBCategory category = MBCategoryUtil.findByPrimaryKey(categoryId); Date now = new Date(); validate(subject, body); MBMessage message = MBMessageUtil.findByPrimaryKey( new MBMessagePK(topicId, messageId)); // File attachments if (files.size() > 0) { String companyId = message.getCompanyId(); String portletId = Company.SYSTEM; String groupId = Group.DEFAULT_PARENT_GROUP_ID; String repositoryId = Company.SYSTEM; String dirName = message.getAttachmentsDir(); try { DLServiceUtil.deleteDirectory( companyId, portletId, repositoryId, dirName); } catch (NoSuchDirectoryException nsde) { } DLServiceUtil.addDirectory(companyId, repositoryId, dirName); for (int i = 0; i < files.size(); i++) { ObjectValuePair ovp = (ObjectValuePair)files.get(i); String fileName = (String)ovp.getKey(); byte[] byteArray = (byte[])ovp.getValue(); try { DLServiceUtil.addFile( companyId, portletId, groupId, repositoryId, dirName + "/" + fileName, byteArray); } catch (DuplicateFileException dfe) { } } } // Message message.setModifiedDate(now); message.setSubject(subject); message.setBody(body); message.setAttachments((files.size() > 0 ? true : false)); MBMessageUtil.update(message); // Subscriptions notifySubscribers(message, prefs, true); // Category category.setLastPostDate(now); MBCategoryUtil.update(category); // Lucene try { if (!category.isDiscussion()) { Indexer.updateMessage( message.getCompanyId(), category.getGroupId(), category.getCategoryId(), message.getTopicId(), message.getThreadId(), messageId, subject, body); } } catch (IOException ioe) { _log.error(ioe.getMessage()); } return message; }
57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/d6b02fdb73be07a1fc7332713e89293b3822dfb8/MBMessageLocalServiceImpl.java/clean/portal-ejb/src/com/liferay/portlet/messageboards/service/impl/MBMessageLocalServiceImpl.java
category.getCategoryId(), message.getTopicId(), message.getThreadId(), messageId, subject, body);
category.getCategoryId(), message.getThreadId(), messageId, subject, body);
public MBMessage updateMessage( String topicId, String messageId, String categoryId, String subject, String body, List files, PortletPreferences prefs) throws PortalException, SystemException { // Message MBCategory category = MBCategoryUtil.findByPrimaryKey(categoryId); Date now = new Date(); validate(subject, body); MBMessage message = MBMessageUtil.findByPrimaryKey( new MBMessagePK(topicId, messageId)); // File attachments if (files.size() > 0) { String companyId = message.getCompanyId(); String portletId = Company.SYSTEM; String groupId = Group.DEFAULT_PARENT_GROUP_ID; String repositoryId = Company.SYSTEM; String dirName = message.getAttachmentsDir(); try { DLServiceUtil.deleteDirectory( companyId, portletId, repositoryId, dirName); } catch (NoSuchDirectoryException nsde) { } DLServiceUtil.addDirectory(companyId, repositoryId, dirName); for (int i = 0; i < files.size(); i++) { ObjectValuePair ovp = (ObjectValuePair)files.get(i); String fileName = (String)ovp.getKey(); byte[] byteArray = (byte[])ovp.getValue(); try { DLServiceUtil.addFile( companyId, portletId, groupId, repositoryId, dirName + "/" + fileName, byteArray); } catch (DuplicateFileException dfe) { } } } // Message message.setModifiedDate(now); message.setSubject(subject); message.setBody(body); message.setAttachments((files.size() > 0 ? true : false)); MBMessageUtil.update(message); // Subscriptions notifySubscribers(message, prefs, true); // Category category.setLastPostDate(now); MBCategoryUtil.update(category); // Lucene try { if (!category.isDiscussion()) { Indexer.updateMessage( message.getCompanyId(), category.getGroupId(), category.getCategoryId(), message.getTopicId(), message.getThreadId(), messageId, subject, body); } } catch (IOException ioe) { _log.error(ioe.getMessage()); } return message; }
57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/d6b02fdb73be07a1fc7332713e89293b3822dfb8/MBMessageLocalServiceImpl.java/clean/portal-ejb/src/com/liferay/portlet/messageboards/service/impl/MBMessageLocalServiceImpl.java
e instanceof CaptchaException ||
e instanceof CaptchaTextException ||
public void processAction( ActionMapping mapping, ActionForm form, PortletConfig config, ActionRequest req, ActionResponse res) throws Exception { String cmd = ParamUtil.getString(req, Constants.CMD); try { if (cmd.equals(Constants.ADD) || cmd.equals(Constants.UPDATE)) { updateCategory(req); } else if (cmd.equals(Constants.DELETE)) { deleteCategory(req); } sendRedirect(req, res); } catch (Exception e) { if (e != null && e instanceof NoSuchCategoryException || e instanceof PrincipalException) { SessionErrors.add(req, e.getClass().getName()); setForward(req, "portlet.message_boards.error"); } else if (e != null && e instanceof CaptchaException || e instanceof CategoryNameException) { SessionErrors.add(req, e.getClass().getName()); } else { throw e; } } }
57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/fa825e278fff56c5878f6bf4ebfe8e8c47fa5e6f/EditCategoryAction.java/buggy/portal-ejb/src/com/liferay/portlet/messageboards/action/EditCategoryAction.java
doc.add(LuceneFields.getKeyword( LuceneFields.COMPANY_ID, companyId)); doc.add(LuceneFields.getKeyword( LuceneFields.PORTLET_ID, portletId));
doc.add( LuceneFields.getKeyword(LuceneFields.COMPANY_ID, companyId)); doc.add( LuceneFields.getKeyword(LuceneFields.PORTLET_ID, portletId));
public static void addFile( String companyId, String portletId, String groupId, String repositoryId, String fileName) throws IOException { synchronized (IndexWriter.class) { if (_log.isDebugEnabled()) { _log.debug( "Indexing document " + companyId + " " + portletId + " " + groupId + " " + repositoryId + " " + fileName); } String fileExt = fileName; int fileExtPos = fileExt.indexOf(DLServiceImpl.VERSION); if (fileExtPos != -1) { fileExt = fileExt.substring( fileExt.lastIndexOf(StringPool.PERIOD, fileExtPos), fileExtPos); } else { fileExt = fileExt.substring( fileExt.lastIndexOf(StringPool.PERIOD), fileExt.length()); } InputStream is = null; Session session = null; try { session = JCRFactoryUtil.createSession(); Node contentNode = DLLocalServiceUtil.getFileContentNode( session, companyId, repositoryId, fileName, 0); is = contentNode.getProperty(JCRConstants.JCR_DATA).getStream(); } catch (Exception e) { } finally { if (session != null) { session.logout(); } } if (is == null) { if (_log.isDebugEnabled()) { _log.debug( "Document " + companyId + " " + portletId + " " + groupId + " " + repositoryId + " " + fileName + " does not have any content"); } return; } IndexWriter writer = LuceneUtil.getWriter(companyId); Document doc = new Document(); doc.add( LuceneFields.getKeyword( LuceneFields.UID, LuceneFields.getUID(portletId, repositoryId, fileName))); doc.add(LuceneFields.getKeyword( LuceneFields.COMPANY_ID, companyId)); doc.add(LuceneFields.getKeyword( LuceneFields.PORTLET_ID, portletId)); doc.add(LuceneFields.getKeyword(LuceneFields.GROUP_ID, groupId)); doc.add(LuceneFields.getFile(LuceneFields.CONTENT, is, fileExt)); doc.add(LuceneFields.getDate(LuceneFields.MODIFIED)); doc.add(LuceneFields.getKeyword("repositoryId", repositoryId)); doc.add(LuceneFields.getKeyword("path", fileName)); writer.addDocument(doc); LuceneUtil.write(writer); if (_log.isDebugEnabled()) { _log.debug( "Document " + companyId + " " + portletId + " " + groupId + " " + repositoryId + " " + fileName + " indexed successfully"); } } }
57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/fa825e278fff56c5878f6bf4ebfe8e8c47fa5e6f/IndexerImpl.java/buggy/documentlibrary-ejb/src/com/liferay/documentlibrary/util/IndexerImpl.java
if ( panel.c.css instanceof CSSBank ) {
if ( panel.c.css instanceof XRStyleReference ) { inspector = new DOMInspector( panel.doc, panel.c, (XRStyleReference)panel.c.css ); } else {
public void actionPerformed( ActionEvent evt ) { if ( inspectorFrame == null ) { inspectorFrame = new JFrame( "DOM Tree Inspector" ); } if ( inspector == null ) { // inspectorFrame = new JFrame("DOM Tree Inspector"); // CLEAN: this is more complicated than it needs to be // DOM Tree Inspector needs to work with either CSSBank // or XRStyleReference--implementations are not perfectly // so we have different constructors if ( panel.c.css instanceof CSSBank ) { inspector = new DOMInspector( panel.doc ); } else { inspector = new DOMInspector( panel.doc, panel.c, (XRStyleReference)panel.c.css ); } inspectorFrame.getContentPane().add( inspector ); inspectorFrame.pack(); inspectorFrame.setSize( text_width, 600 ); inspectorFrame.show(); } else { if ( panel.c.css instanceof CSSBank ) { inspector.setForDocument( panel.doc ); } else { inspector.setForDocument( panel.doc, panel.c, (XRStyleReference)panel.c.css ); } } inspectorFrame.show(); }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/e4269a76c483365a1f7518bc84ebcc30f88d003b/HTMLTest.java/clean/src/java/org/xhtmlrenderer/swing/HTMLTest.java
} else { inspector = new DOMInspector( panel.doc, panel.c, (XRStyleReference)panel.c.css );
public void actionPerformed( ActionEvent evt ) { if ( inspectorFrame == null ) { inspectorFrame = new JFrame( "DOM Tree Inspector" ); } if ( inspector == null ) { // inspectorFrame = new JFrame("DOM Tree Inspector"); // CLEAN: this is more complicated than it needs to be // DOM Tree Inspector needs to work with either CSSBank // or XRStyleReference--implementations are not perfectly // so we have different constructors if ( panel.c.css instanceof CSSBank ) { inspector = new DOMInspector( panel.doc ); } else { inspector = new DOMInspector( panel.doc, panel.c, (XRStyleReference)panel.c.css ); } inspectorFrame.getContentPane().add( inspector ); inspectorFrame.pack(); inspectorFrame.setSize( text_width, 600 ); inspectorFrame.show(); } else { if ( panel.c.css instanceof CSSBank ) { inspector.setForDocument( panel.doc ); } else { inspector.setForDocument( panel.doc, panel.c, (XRStyleReference)panel.c.css ); } } inspectorFrame.show(); }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/e4269a76c483365a1f7518bc84ebcc30f88d003b/HTMLTest.java/clean/src/java/org/xhtmlrenderer/swing/HTMLTest.java
if ( panel.c.css instanceof CSSBank ) {
if ( panel.c.css instanceof XRStyleReference ) { inspector.setForDocument( panel.doc, panel.c, (XRStyleReference)panel.c.css ); } else {
public void actionPerformed( ActionEvent evt ) { if ( inspectorFrame == null ) { inspectorFrame = new JFrame( "DOM Tree Inspector" ); } if ( inspector == null ) { // inspectorFrame = new JFrame("DOM Tree Inspector"); // CLEAN: this is more complicated than it needs to be // DOM Tree Inspector needs to work with either CSSBank // or XRStyleReference--implementations are not perfectly // so we have different constructors if ( panel.c.css instanceof CSSBank ) { inspector = new DOMInspector( panel.doc ); } else { inspector = new DOMInspector( panel.doc, panel.c, (XRStyleReference)panel.c.css ); } inspectorFrame.getContentPane().add( inspector ); inspectorFrame.pack(); inspectorFrame.setSize( text_width, 600 ); inspectorFrame.show(); } else { if ( panel.c.css instanceof CSSBank ) { inspector.setForDocument( panel.doc ); } else { inspector.setForDocument( panel.doc, panel.c, (XRStyleReference)panel.c.css ); } } inspectorFrame.show(); }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/e4269a76c483365a1f7518bc84ebcc30f88d003b/HTMLTest.java/clean/src/java/org/xhtmlrenderer/swing/HTMLTest.java
} else { inspector.setForDocument( panel.doc, panel.c, (XRStyleReference)panel.c.css );
public void actionPerformed( ActionEvent evt ) { if ( inspectorFrame == null ) { inspectorFrame = new JFrame( "DOM Tree Inspector" ); } if ( inspector == null ) { // inspectorFrame = new JFrame("DOM Tree Inspector"); // CLEAN: this is more complicated than it needs to be // DOM Tree Inspector needs to work with either CSSBank // or XRStyleReference--implementations are not perfectly // so we have different constructors if ( panel.c.css instanceof CSSBank ) { inspector = new DOMInspector( panel.doc ); } else { inspector = new DOMInspector( panel.doc, panel.c, (XRStyleReference)panel.c.css ); } inspectorFrame.getContentPane().add( inspector ); inspectorFrame.pack(); inspectorFrame.setSize( text_width, 600 ); inspectorFrame.show(); } else { if ( panel.c.css instanceof CSSBank ) { inspector.setForDocument( panel.doc ); } else { inspector.setForDocument( panel.doc, panel.c, (XRStyleReference)panel.c.css ); } } inspectorFrame.show(); }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/e4269a76c483365a1f7518bc84ebcc30f88d003b/HTMLTest.java/clean/src/java/org/xhtmlrenderer/swing/HTMLTest.java
addFileLoadAction( test, "expansion-bug", "/home/tobe/Projekt/xhtmlrenderer/demos/expansion-bug.html" );
public HTMLTest( String[] args ) throws Exception { super( BASE_TITLE ); panel.setPreferredSize( new Dimension( text_width, text_width ) ); JScrollPane scroll = new JScrollPane( panel ); scroll.setVerticalScrollBarPolicy( scroll.VERTICAL_SCROLLBAR_ALWAYS ); scroll.setHorizontalScrollBarPolicy( scroll.HORIZONTAL_SCROLLBAR_ALWAYS ); scroll.setPreferredSize( new Dimension( text_width, text_width ) ); panel.addMouseListener( new ClickMouseListener( panel ) ); if ( args.length > 0 ) { // CLEAN // File file = new File(args[0]); // panel.setDocument(x.loadDocument(args[0]),file.toURL()); loadDocument( args[0] ); } getContentPane().add( "Center", scroll ); JMenuBar mb = new JMenuBar(); JMenu file = new JMenu( "File" ); mb.add( file ); file.setMnemonic( 'F' ); file.add( new QuitAction() ); JMenu view = new JMenu( "View" ); mb.add( view ); view.setMnemonic( 'V' ); view.add( new RefreshPageAction() ); view.add( new ReloadPageAction() ); JMenu test = new JMenu( "Test" ); mb.add( test ); test.setMnemonic( 'T' ); String demoRootDir = "demos/browser/xhtml"; addFileLoadAction( test, "One Liner", demoRootDir + "/one-line.xhtml" ); addFileLoadAction( test, "Background Colors/Images", demoRootDir + "/background.xhtml" ); addFileLoadAction( test, "Borders", demoRootDir + "/border.xhtml" ); addFileLoadAction( test, "Box Sizing", demoRootDir + "/box-sizing.xhtml" ); addFileLoadAction( test, "Mixed Test (1)", demoRootDir + "/content.xhtml" ); addFileLoadAction( test, "Line Breaking", demoRootDir + "/breaking.xhtml" ); addFileLoadAction( test, "Headers", demoRootDir + "/header.xhtml" ); addFileLoadAction( test, "Inline Image", demoRootDir + "/image.xhtml" ); addFileLoadAction( test, "List ", demoRootDir + "/list.xhtml" ); addFileLoadAction( test, "Nesting", demoRootDir + "/nested.xhtml" ); addFileLoadAction( test, "General Styled Text", demoRootDir + "/paragraph.xhtml" ); addFileLoadAction( test, "CSS Selectors", demoRootDir + "/selectors.xhtml" ); addFileLoadAction( test, "Table", demoRootDir + "/table.xhtml" ); addFileLoadAction( test, "Text Alignment", demoRootDir + "/text-alignment.xhtml" ); addFileLoadAction( test, "Whitespace Handling", demoRootDir + "/whitespace.xhtml" ); addFileLoadAction( test, "iTunes Email", demoRootDir + "/itunes/itunes1.xhtml" ); addFileLoadAction( test, "Follow Links", demoRootDir + "/link.xhtml" ); addFileLoadAction( test, "Hamlet (slow!)", demoRootDir + "/hamlet.xhtml" ); addFileLoadAction( test, "extended", demoRootDir + "/extended.xhtml" ); addFileLoadAction( test, "XML-like", demoRootDir + "/xml.xhtml" ); addFileLoadAction( test, "XML", demoRootDir + "/xml.xml" ); JMenu debug = new JMenu( "Debug" ); mb.add( debug ); debug.setMnemonic( 'D' ); JMenu debugShow = new JMenu( "Show" ); debug.add( debugShow ); debugShow.setMnemonic( 'S' ); debugShow.add( new JCheckBoxMenuItem( new BoxOutlinesAction() ) ); debugShow.add( new JCheckBoxMenuItem( new LineBoxOutlinesAction() ) ); debugShow.add( new JCheckBoxMenuItem( new InlineBoxesAction() ) ); debug.add( new ShowDOMInspectorAction() ); debug.add( new AbstractAction( "Print Box Tree" ) { public void actionPerformed( ActionEvent evt ) { panel.printTree(); } } ); setJMenuBar( mb ); }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/e4269a76c483365a1f7518bc84ebcc30f88d003b/HTMLTest.java/clean/src/java/org/xhtmlrenderer/swing/HTMLTest.java
if(event.getType() == IResourceChangeEvent.PRE_BUILD){ refreshJob.buildDone = false;
Collection changedMarkers = new ArrayList(); Collection addedMarkers = new ArrayList(); Collection removedMarkers = new ArrayList(); if (event.getType() == IResourceChangeEvent.PRE_BUILD) { updateJob.buildDone = false;
public void resourceChanged(IResourceChangeEvent event) { String[] markerTypes = getMarkerTypes(); if(event.getType() == IResourceChangeEvent.PRE_BUILD){ refreshJob.buildDone = false; return; } if(event.getType() == IResourceChangeEvent.POST_BUILD){ refreshJob.buildDone = true; refreshJob.schedule(100); return; } for (int idx = 0; idx < markerTypes.length; idx++) { IMarkerDelta[] markerDeltas = event.findMarkerDeltas( markerTypes[idx], true); for (int i = 0; i < markerDeltas.length; i++) { IMarkerDelta delta = markerDeltas[i]; int kind = delta.getKind(); if (kind == IResourceDelta.CHANGED) { refreshJob.addChangedMarker(delta.getMarker()); } if (kind == IResourceDelta.ADDED) { refreshJob.addAddedMarker(delta.getMarker()); } if (kind == IResourceDelta.REMOVED) { refreshJob.addRemovedMarker(delta.getMarker()); } } } }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/97da45b298c8fc6737c257bdf9b28c993ca2458c/MarkerView.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerView.java
if(event.getType() == IResourceChangeEvent.POST_BUILD){ refreshJob.buildDone = true; refreshJob.schedule(100);
if (event.getType() == IResourceChangeEvent.POST_BUILD) { updateJob.buildDone = true; updateJob.schedule();
public void resourceChanged(IResourceChangeEvent event) { String[] markerTypes = getMarkerTypes(); if(event.getType() == IResourceChangeEvent.PRE_BUILD){ refreshJob.buildDone = false; return; } if(event.getType() == IResourceChangeEvent.POST_BUILD){ refreshJob.buildDone = true; refreshJob.schedule(100); return; } for (int idx = 0; idx < markerTypes.length; idx++) { IMarkerDelta[] markerDeltas = event.findMarkerDeltas( markerTypes[idx], true); for (int i = 0; i < markerDeltas.length; i++) { IMarkerDelta delta = markerDeltas[i]; int kind = delta.getKind(); if (kind == IResourceDelta.CHANGED) { refreshJob.addChangedMarker(delta.getMarker()); } if (kind == IResourceDelta.ADDED) { refreshJob.addAddedMarker(delta.getMarker()); } if (kind == IResourceDelta.REMOVED) { refreshJob.addRemovedMarker(delta.getMarker()); } } } }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/97da45b298c8fc6737c257bdf9b28c993ca2458c/MarkerView.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerView.java
public void resourceChanged(IResourceChangeEvent event) { String[] markerTypes = getMarkerTypes(); if(event.getType() == IResourceChangeEvent.PRE_BUILD){ refreshJob.buildDone = false; return; } if(event.getType() == IResourceChangeEvent.POST_BUILD){ refreshJob.buildDone = true; refreshJob.schedule(100); return; } for (int idx = 0; idx < markerTypes.length; idx++) { IMarkerDelta[] markerDeltas = event.findMarkerDeltas( markerTypes[idx], true); for (int i = 0; i < markerDeltas.length; i++) { IMarkerDelta delta = markerDeltas[i]; int kind = delta.getKind(); if (kind == IResourceDelta.CHANGED) { refreshJob.addChangedMarker(delta.getMarker()); } if (kind == IResourceDelta.ADDED) { refreshJob.addAddedMarker(delta.getMarker()); } if (kind == IResourceDelta.REMOVED) { refreshJob.addRemovedMarker(delta.getMarker()); } } } }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/97da45b298c8fc6737c257bdf9b28c993ca2458c/MarkerView.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerView.java
refreshJob.addChangedMarker(delta.getMarker());
changedMarkers.add(delta.getMarker());
public void resourceChanged(IResourceChangeEvent event) { String[] markerTypes = getMarkerTypes(); if(event.getType() == IResourceChangeEvent.PRE_BUILD){ refreshJob.buildDone = false; return; } if(event.getType() == IResourceChangeEvent.POST_BUILD){ refreshJob.buildDone = true; refreshJob.schedule(100); return; } for (int idx = 0; idx < markerTypes.length; idx++) { IMarkerDelta[] markerDeltas = event.findMarkerDeltas( markerTypes[idx], true); for (int i = 0; i < markerDeltas.length; i++) { IMarkerDelta delta = markerDeltas[i]; int kind = delta.getKind(); if (kind == IResourceDelta.CHANGED) { refreshJob.addChangedMarker(delta.getMarker()); } if (kind == IResourceDelta.ADDED) { refreshJob.addAddedMarker(delta.getMarker()); } if (kind == IResourceDelta.REMOVED) { refreshJob.addRemovedMarker(delta.getMarker()); } } } }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/97da45b298c8fc6737c257bdf9b28c993ca2458c/MarkerView.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerView.java
refreshJob.addAddedMarker(delta.getMarker()); }
addedMarkers.add(delta.getMarker()); }
public void resourceChanged(IResourceChangeEvent event) { String[] markerTypes = getMarkerTypes(); if(event.getType() == IResourceChangeEvent.PRE_BUILD){ refreshJob.buildDone = false; return; } if(event.getType() == IResourceChangeEvent.POST_BUILD){ refreshJob.buildDone = true; refreshJob.schedule(100); return; } for (int idx = 0; idx < markerTypes.length; idx++) { IMarkerDelta[] markerDeltas = event.findMarkerDeltas( markerTypes[idx], true); for (int i = 0; i < markerDeltas.length; i++) { IMarkerDelta delta = markerDeltas[i]; int kind = delta.getKind(); if (kind == IResourceDelta.CHANGED) { refreshJob.addChangedMarker(delta.getMarker()); } if (kind == IResourceDelta.ADDED) { refreshJob.addAddedMarker(delta.getMarker()); } if (kind == IResourceDelta.REMOVED) { refreshJob.addRemovedMarker(delta.getMarker()); } } } }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/97da45b298c8fc6737c257bdf9b28c993ca2458c/MarkerView.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerView.java