rem
stringlengths 0
477k
| add
stringlengths 0
313k
| context
stringlengths 6
599k
| meta
stringlengths 141
403
|
---|---|---|---|
public String render (WikiPage page) throws WikiPageRenderer.RenderException { WikiData[] dataElement = page.getData(); StringBuffer sb = new StringBuffer (2048); for (int x=0; x<dataElement.length; x++) { int type = dataElement[x].getType (); String data = (String) dataElement[x].getData (); String str = null; switch (type) { case WikiDataTypes.START_BOLD: str = renderBoldStart (); break; case WikiDataTypes.END_BOLD: str = renderBoldEnd (); break; case WikiDataTypes.START_UNDERLINE: str = renderUnderlineStart(); break; case WikiDataTypes.END_UNDERLINE: str = renderUnderlineEnd(); break; case WikiDataTypes.START_ITALIC: str = renderItalicStart(); break; case WikiDataTypes.END_ITALIC: str = renderItalicEnd(); break; case WikiDataTypes.PARAGRAPH_BREAK: str = renderParagraphBreak(); break; case WikiDataTypes.LINE_BREAK: str = renderLineBreak(); break; case WikiDataTypes.HORIZ_LINE: str = renderHorizLine(); break; case WikiDataTypes.PLAIN_TEXT: str = renderPlainText (data); break; case WikiDataTypes.PAGE_REFERENCE: str = renderWikiTerm (data, page.getTitle()); break; case WikiDataTypes.INDENT: int many = (data != null && data.length() > 0) ? Integer.parseInt(data) : 1; str = renderIndent (many); break; case WikiDataTypes.START_NAMED_HEADER: str = renderHeaderStart (data); break; case WikiDataTypes.END_NAMED_HEADER: str = renderHeaderEnd (data); break; case WikiDataTypes.URL: str = _urlRenderer.renderURL (data); break; case WikiDataTypes.IMAGE: str = renderImage (data); break; case WikiDataTypes.JAVADOC: str = renderJavaDoc (data); break; case WikiDataTypes.START_COLOR: str = renderColorStart (data); break; case WikiDataTypes.END_COLOR: str = renderColorEnd (); break; case WikiDataTypes.EMAIL: str = renderEmail (data); break; case WikiDataTypes.QUOTED_BLOCK: str = renderQuotedBlock (data); break; case WikiDataTypes.SPACE: str = renderSpace (); break; case WikiDataTypes.LT: str = renderLT (); break; case WikiDataTypes.GT: str = renderGT (); break; default: str = renderUnknown (dataElement[x]); } if (str != null) sb.append (str); } return sb.toString (); | public void render (WikiPage page, OutputStream out) throws IOException, WikiPageRenderer.RenderException { out.write (render (page).getBytes()); | public String render (WikiPage page) throws WikiPageRenderer.RenderException { WikiData[] dataElement = page.getData(); StringBuffer sb = new StringBuffer (2048); for (int x=0; x<dataElement.length; x++) { int type = dataElement[x].getType (); String data = (String) dataElement[x].getData (); String str = null; switch (type) { case WikiDataTypes.START_BOLD: str = renderBoldStart (); break; case WikiDataTypes.END_BOLD: str = renderBoldEnd (); break; case WikiDataTypes.START_UNDERLINE: str = renderUnderlineStart(); break; case WikiDataTypes.END_UNDERLINE: str = renderUnderlineEnd(); break; case WikiDataTypes.START_ITALIC: str = renderItalicStart(); break; case WikiDataTypes.END_ITALIC: str = renderItalicEnd(); break; case WikiDataTypes.PARAGRAPH_BREAK: str = renderParagraphBreak(); break; case WikiDataTypes.LINE_BREAK: str = renderLineBreak(); break; case WikiDataTypes.HORIZ_LINE: str = renderHorizLine(); break; case WikiDataTypes.PLAIN_TEXT: str = renderPlainText (data); break; case WikiDataTypes.PAGE_REFERENCE: str = renderWikiTerm (data, page.getTitle()); break; case WikiDataTypes.INDENT: int many = (data != null && data.length() > 0) ? Integer.parseInt(data) : 1; str = renderIndent (many); break; case WikiDataTypes.START_NAMED_HEADER: str = renderHeaderStart (data); break; case WikiDataTypes.END_NAMED_HEADER: str = renderHeaderEnd (data); break; case WikiDataTypes.URL: str = _urlRenderer.renderURL (data); break; // @deprecated "image" is now a URL type. case WikiDataTypes.IMAGE: str = renderImage (data); break; // @deprecated "javadoc" is now a URL type. case WikiDataTypes.JAVADOC: str = renderJavaDoc (data); break; case WikiDataTypes.START_COLOR: str = renderColorStart (data); break; case WikiDataTypes.END_COLOR: str = renderColorEnd (); break; case WikiDataTypes.EMAIL: str = renderEmail (data); break; case WikiDataTypes.QUOTED_BLOCK: str = renderQuotedBlock (data); break; case WikiDataTypes.SPACE: str = renderSpace (); break; case WikiDataTypes.LT: str = renderLT (); break; case WikiDataTypes.GT: str = renderGT (); break; default: str = renderUnknown (dataElement[x]); } // esac if (str != null) sb.append (str); } // for x return sb.toString (); } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/2e6a5e583cccdc19c543caf9a1fb259181c98cb6/WikiPageRenderer.java/clean/wiki/src/org/tcdi/opensource/wiki/renderer/WikiPageRenderer.java |
|| o instanceof Date) | || o instanceof Date || o instanceof Boolean) | public Object filter(String fieldId, Object o) { Object result; if (o == null) { return null; } else if (o instanceof IObject) { result = filter(fieldId, (Filterable) o); } else if (o instanceof Collection) { result = filter(fieldId, (Collection) o); } else if (o instanceof Map) { result = filter(fieldId, (Map) o); } else if ( o instanceof Details || o instanceof Number || o instanceof String || o instanceof Date) { result = o; } else { throw new RuntimeException( "Update Filter cannot allow unknown types to be saved." + o.getClass().getName()+" is not in {IObject,Collection,Map}"); } return result; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9cc42436cf7f49fe0d2fcfc65e2d5a7109ac90a9/UpdateFilter.java/clean/components/server/src/ome/tools/hibernate/UpdateFilter.java |
double result = recv.getRuntime().random.nextDouble(); return RubyFloat.newFloat(recv.getRuntime(), result); | ceil = 0; | public static RubyNumeric rand(IRubyObject recv, IRubyObject args[]) { if (args.length == 0) { double result = recv.getRuntime().random.nextDouble(); return RubyFloat.newFloat(recv.getRuntime(), result); } else if (args.length == 1) { RubyInteger integerCeil = (RubyInteger) args[0].convertToType("Integer", "to_int", true); long ceil = integerCeil.getLongValue(); if (ceil > Integer.MAX_VALUE) { throw new NotImplementedError(recv.getRuntime(), "Random values larger than Integer.MAX_VALUE not supported"); } return RubyFixnum.newFixnum(recv.getRuntime(), recv.getRuntime().random.nextInt((int) ceil)); } else { throw new ArgumentError(recv.getRuntime(), "wrong # of arguments(" + args.length + " for 1)"); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/5742ade921eb900cb64ec6888a7431f111da5c32/KernelModule.java/clean/org/jruby/KernelModule.java |
long ceil = integerCeil.getLongValue(); | ceil = integerCeil.getLongValue(); ceil = Math.abs(ceil); | public static RubyNumeric rand(IRubyObject recv, IRubyObject args[]) { if (args.length == 0) { double result = recv.getRuntime().random.nextDouble(); return RubyFloat.newFloat(recv.getRuntime(), result); } else if (args.length == 1) { RubyInteger integerCeil = (RubyInteger) args[0].convertToType("Integer", "to_int", true); long ceil = integerCeil.getLongValue(); if (ceil > Integer.MAX_VALUE) { throw new NotImplementedError(recv.getRuntime(), "Random values larger than Integer.MAX_VALUE not supported"); } return RubyFixnum.newFixnum(recv.getRuntime(), recv.getRuntime().random.nextInt((int) ceil)); } else { throw new ArgumentError(recv.getRuntime(), "wrong # of arguments(" + args.length + " for 1)"); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/5742ade921eb900cb64ec6888a7431f111da5c32/KernelModule.java/clean/org/jruby/KernelModule.java |
return RubyFixnum.newFixnum(recv.getRuntime(), recv.getRuntime().random.nextInt((int) ceil)); | public static RubyNumeric rand(IRubyObject recv, IRubyObject args[]) { if (args.length == 0) { double result = recv.getRuntime().random.nextDouble(); return RubyFloat.newFloat(recv.getRuntime(), result); } else if (args.length == 1) { RubyInteger integerCeil = (RubyInteger) args[0].convertToType("Integer", "to_int", true); long ceil = integerCeil.getLongValue(); if (ceil > Integer.MAX_VALUE) { throw new NotImplementedError(recv.getRuntime(), "Random values larger than Integer.MAX_VALUE not supported"); } return RubyFixnum.newFixnum(recv.getRuntime(), recv.getRuntime().random.nextInt((int) ceil)); } else { throw new ArgumentError(recv.getRuntime(), "wrong # of arguments(" + args.length + " for 1)"); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/5742ade921eb900cb64ec6888a7431f111da5c32/KernelModule.java/clean/org/jruby/KernelModule.java |
|
if (ceil == 0) { double result = recv.getRuntime().random.nextDouble(); return RubyFloat.newFloat(recv.getRuntime(), result); } else { return RubyFixnum.newFixnum(recv.getRuntime(), recv.getRuntime().random.nextInt((int) ceil)); } | public static RubyNumeric rand(IRubyObject recv, IRubyObject args[]) { if (args.length == 0) { double result = recv.getRuntime().random.nextDouble(); return RubyFloat.newFloat(recv.getRuntime(), result); } else if (args.length == 1) { RubyInteger integerCeil = (RubyInteger) args[0].convertToType("Integer", "to_int", true); long ceil = integerCeil.getLongValue(); if (ceil > Integer.MAX_VALUE) { throw new NotImplementedError(recv.getRuntime(), "Random values larger than Integer.MAX_VALUE not supported"); } return RubyFixnum.newFixnum(recv.getRuntime(), recv.getRuntime().random.nextInt((int) ceil)); } else { throw new ArgumentError(recv.getRuntime(), "wrong # of arguments(" + args.length + " for 1)"); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/5742ade921eb900cb64ec6888a7431f111da5c32/KernelModule.java/clean/org/jruby/KernelModule.java |
|
public static RubyInteger srand(IRubyObject recv, IRubyObject[] args) { long oldRandomSeed = recv.getRuntime().randomSeed; if (args.length > 0) { RubyInteger integerSeed = (RubyInteger) args[0].convertToType("Integer", "to_int", true); recv.getRuntime().randomSeed = integerSeed.getLongValue(); } else { recv.getRuntime().randomSeed = System.currentTimeMillis(); // FIXME } recv.getRuntime().random.setSeed(recv.getRuntime().randomSeed); return RubyFixnum.newFixnum(recv.getRuntime(), oldRandomSeed); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/5742ade921eb900cb64ec6888a7431f111da5c32/KernelModule.java/clean/org/jruby/KernelModule.java |
||
serviceFactory = new ServiceFactory( applicationContext ); | serviceFactory = new InternalServiceFactory( applicationContext ); localQuery = (LocalQuery) serviceFactory.getQueryService(); localUpdate = (LocalUpdate) serviceFactory.getUpdateService(); | public void create() { applicationContext = OmeroContext.getManagedServerContext(); serviceFactory = new ServiceFactory( applicationContext ); eventContext = (EventContext) applicationContext.getBean("eventContext"); localQuery = (LocalQuery) applicationContext.getBean(IQuery.class.getName()); localUpdate = (LocalUpdate) applicationContext.getBean(IUpdate.class.getName()); log.debug("Created:\n"+getLogString()); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/dc8dde051a1e2b716514b3964c9222ce006ebea9/AbstractBean.java/buggy/components/ejb/src/ome/ro/ejb/AbstractBean.java |
localQuery = (LocalQuery) applicationContext.getBean(IQuery.class.getName()); localUpdate = (LocalUpdate) applicationContext.getBean(IUpdate.class.getName()); | public void create() { applicationContext = OmeroContext.getManagedServerContext(); serviceFactory = new ServiceFactory( applicationContext ); eventContext = (EventContext) applicationContext.getBean("eventContext"); localQuery = (LocalQuery) applicationContext.getBean(IQuery.class.getName()); localUpdate = (LocalUpdate) applicationContext.getBean(IUpdate.class.getName()); log.debug("Created:\n"+getLogString()); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/dc8dde051a1e2b716514b3964c9222ce006ebea9/AbstractBean.java/buggy/components/ejb/src/ome/ro/ejb/AbstractBean.java |
|
protected Object wrap( InvocationContext context, String factoryName ) throws Exception | protected Object wrap( InvocationContext context, Class<? extends ServiceInterface> factoryClass ) throws Exception | protected Object wrap( InvocationContext context, String factoryName ) throws Exception { try { login(); AOPAdapter adapter = AOPAdapter.create( (ProxyFactoryBean) applicationContext.getBean(factoryName), context ); return adapter.proceed( ); } catch (Throwable t) { throw translateException( t ); } finally { logout(); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/dc8dde051a1e2b716514b3964c9222ce006ebea9/AbstractBean.java/buggy/components/ejb/src/ome/ro/ejb/AbstractBean.java |
String factoryName = "&managed:"+factoryClass.getName(); | protected Object wrap( InvocationContext context, String factoryName ) throws Exception { try { login(); AOPAdapter adapter = AOPAdapter.create( (ProxyFactoryBean) applicationContext.getBean(factoryName), context ); return adapter.proceed( ); } catch (Throwable t) { throw translateException( t ); } finally { logout(); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/dc8dde051a1e2b716514b3964c9222ce006ebea9/AbstractBean.java/buggy/components/ejb/src/ome/ro/ejb/AbstractBean.java |
|
System.out.println("Context contains: helloWorld, hello, file, TestObject[] fruits, SelectList sl(fruits, 3), TestObject flipper"); System.out.println("- - - - - - - - - - - - - - - - - - - -"); | public static void main(String arg[]) { Log.traceExceptions(true); Log.setLevel(Log.ALL); Log.setTarget(System.err); if (arg.length != 0) { System.out.println("Enabling log types"); Log.enableTypes(arg); } // Build a context WebMacro wm = null; Context context = null; try { wm = new WM(); context = new Context(null); Object names[] = { "prop" }; context.setProperty(names, "Example property"); } catch (Exception e) { e.printStackTrace(); } context.put("helloworld", "Hello World"); context.put("hello", "Hello"); context.put("file", "include.txt"); TestObject[] fruits = { new TestObject("apple",false), new TestObject("lemon",true), new TestObject("pear",false), new TestObject("orange",true), new TestObject("watermelon",false), new TestObject("peach",false), new TestObject("lime",true) }; SelectList sl = new SelectList(fruits, 3); context.put("sl-fruits", sl); context.put("fruits", fruits); context.put("flipper", new TestObject("flip",false)); System.out.println("- - - - - - - - - - - - - - - - - - - -"); try { Template t1 = new StreamTemplate(wm.getBroker(), new InputStreamReader(System.in)); t1.parse(); Writer w = new OutputStreamWriter(System.out); System.out.println("*** RESULT ***"); t1.write(w,context); w.close(); System.out.println("*** DONE ***"); //System.out.println(result); } catch (Exception e) { e.printStackTrace(); } } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/78a66b349748346624878ff04bb72f314bdac97c/StreamTemplate.java/buggy/webmacro/src/org/webmacro/engine/StreamTemplate.java |
|
} | } | public RubyClass defineOrGetClassUnder(String name, RubyClass superClazz) { IRubyObject type = getConstantAt(name); if (type == null) { return (RubyClass) setConstant(name, getRuntime().defineClassUnder(name, superClazz, cref)); } if (!(type instanceof RubyClass)) { throw getRuntime().newTypeError(name + " is not a class."); } return (RubyClass) type; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/233ec03a72f5bddc2e09aaf5cd106b639a7ede2e/RubyModule.java/clean/src/org/jruby/RubyModule.java |
} else if (superClazz != null && ((RubyClass) type).getSuperClass().getRealClass() != superClazz) { throw getRuntime().newTypeError("superclass mismatch for class " + name); | public RubyClass defineOrGetClassUnder(String name, RubyClass superClazz) { IRubyObject type = getConstantAt(name); if (type == null) { return (RubyClass) setConstant(name, getRuntime().defineClassUnder(name, superClazz, cref)); } if (!(type instanceof RubyClass)) { throw getRuntime().newTypeError(name + " is not a class."); } return (RubyClass) type; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/233ec03a72f5bddc2e09aaf5cd106b639a7ede2e/RubyModule.java/clean/src/org/jruby/RubyModule.java |
|
return (double)value; | return (double) value; | public double getDoubleValue() { return (double)value; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/962ce6ffe87d8c8388ef1c922b056aea9b6210db/RubyFixnum.java/buggy/org/jruby/RubyFixnum.java |
return ruby.fixnumCache[(int)value]; | return ruby.fixnumCache[(int) value]; | public static RubyFixnum m_newFixnum(Ruby ruby, long value) { // Cache for Fixnums (Performance) if ((value & ~Ruby.FIXNUM_CACHE_MAX) == 0) { return ruby.fixnumCache[(int)value]; } return new RubyFixnum(ruby, value); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/962ce6ffe87d8c8388ef1c922b056aea9b6210db/RubyFixnum.java/buggy/org/jruby/RubyFixnum.java |
public static RubyFixnum m_newFixnum(Ruby ruby, long value) { // Cache for Fixnums (Performance) if ((value & ~Ruby.FIXNUM_CACHE_MAX) == 0) { return ruby.fixnumCache[(int)value]; } return new RubyFixnum(ruby, value); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/962ce6ffe87d8c8388ef1c922b056aea9b6210db/RubyFixnum.java/buggy/org/jruby/RubyFixnum.java |
||
public RubyBoolean op_equal(RubyNumeric other) { if (other instanceof RubyFloat) { return RubyBoolean.m_newBoolean(getRuby(), getDoubleValue() == other.getDoubleValue()); | public RubyBoolean op_equal(RubyObject other) { if (!(other instanceof RubyNumeric)) { return getRuby().getFalse(); } else if (other instanceof RubyFloat) { return RubyBoolean.m_newBoolean( getRuby(), getDoubleValue() == ((RubyFloat) other).getDoubleValue()); | public RubyBoolean op_equal(RubyNumeric other) { if (other instanceof RubyFloat) { return RubyBoolean.m_newBoolean(getRuby(), getDoubleValue() == other.getDoubleValue()); } else { return RubyBoolean.m_newBoolean(getRuby(), getLongValue() == other.getLongValue()); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/962ce6ffe87d8c8388ef1c922b056aea9b6210db/RubyFixnum.java/buggy/org/jruby/RubyFixnum.java |
return RubyBoolean.m_newBoolean(getRuby(), getLongValue() == other.getLongValue()); | return RubyBoolean.m_newBoolean( getRuby(), getLongValue() == ((RubyNumeric) other).getLongValue()); | public RubyBoolean op_equal(RubyNumeric other) { if (other instanceof RubyFloat) { return RubyBoolean.m_newBoolean(getRuby(), getDoubleValue() == other.getDoubleValue()); } else { return RubyBoolean.m_newBoolean(getRuby(), getLongValue() == other.getLongValue()); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/962ce6ffe87d8c8388ef1c922b056aea9b6210db/RubyFixnum.java/buggy/org/jruby/RubyFixnum.java |
return getLongValue() >= other.getLongValue() ? getRuby().getTrue() : getRuby().getFalse(); | return getLongValue() >= other.getLongValue() ? getRuby().getTrue() : getRuby().getFalse(); | public RubyBoolean op_ge(RubyNumeric other) { if (other instanceof RubyFloat) { return RubyFloat.m_newFloat(getRuby(), getDoubleValue()).op_ge(other); } else { return getLongValue() >= other.getLongValue() ? getRuby().getTrue() : getRuby().getFalse(); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/962ce6ffe87d8c8388ef1c922b056aea9b6210db/RubyFixnum.java/buggy/org/jruby/RubyFixnum.java |
return getLongValue() > other.getLongValue() ? getRuby().getTrue() : getRuby().getFalse(); | return getLongValue() > other.getLongValue() ? getRuby().getTrue() : getRuby().getFalse(); | public RubyBoolean op_gt(RubyNumeric other) { if (other instanceof RubyFloat) { return RubyFloat.m_newFloat(getRuby(), getDoubleValue()).op_gt(other); } else { return getLongValue() > other.getLongValue() ? getRuby().getTrue() : getRuby().getFalse(); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/962ce6ffe87d8c8388ef1c922b056aea9b6210db/RubyFixnum.java/buggy/org/jruby/RubyFixnum.java |
return getLongValue() <= other.getLongValue() ? getRuby().getTrue() : getRuby().getFalse(); | return getLongValue() <= other.getLongValue() ? getRuby().getTrue() : getRuby().getFalse(); | public RubyBoolean op_le(RubyNumeric other) { if (other instanceof RubyFloat) { return RubyFloat.m_newFloat(getRuby(), getDoubleValue()).op_le(other); } else { return getLongValue() <= other.getLongValue() ? getRuby().getTrue() : getRuby().getFalse(); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/962ce6ffe87d8c8388ef1c922b056aea9b6210db/RubyFixnum.java/buggy/org/jruby/RubyFixnum.java |
return getLongValue() < other.getLongValue() ? getRuby().getTrue() : getRuby().getFalse(); | return getLongValue() < other.getLongValue() ? getRuby().getTrue() : getRuby().getFalse(); | public RubyBoolean op_lt(RubyNumeric other) { if (other instanceof RubyFloat) { return RubyFloat.m_newFloat(getRuby(), getDoubleValue()).op_lt(other); } else { return getLongValue() < other.getLongValue() ? getRuby().getTrue() : getRuby().getFalse(); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/962ce6ffe87d8c8388ef1c922b056aea9b6210db/RubyFixnum.java/buggy/org/jruby/RubyFixnum.java |
} else if (other instanceof RubyBignum || needBignumAdd(-other.getLongValue())) { | } else if ( other instanceof RubyBignum || needBignumAdd(-other.getLongValue())) { | public RubyNumeric op_minus(RubyNumeric other) { if (other instanceof RubyFloat) { return RubyFloat.m_newFloat(getRuby(), getDoubleValue()).op_minus(other); } else if (other instanceof RubyBignum || needBignumAdd(-other.getLongValue())) { return RubyBignum.m_newBignum(getRuby(), value).op_minus(other); } else { return m_newFixnum(value - other.getLongValue()); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/962ce6ffe87d8c8388ef1c922b056aea9b6210db/RubyFixnum.java/buggy/org/jruby/RubyFixnum.java |
} else if (other instanceof RubyBignum || needBignumMul(other.getLongValue())) { | } else if ( other instanceof RubyBignum || needBignumMul(other.getLongValue())) { | public RubyNumeric op_mul(RubyNumeric other) { if (other instanceof RubyFloat) { return RubyFloat.m_newFloat(getRuby(), getDoubleValue()).op_mul(other); } else if (other instanceof RubyBignum || needBignumMul(other.getLongValue())) { return RubyBignum.m_newBignum(getRuby(), getLongValue()).op_mul(other); } else { return m_newFixnum(getRuby(), getValue() * other.getLongValue()); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/962ce6ffe87d8c8388ef1c922b056aea9b6210db/RubyFixnum.java/buggy/org/jruby/RubyFixnum.java |
} else if (other instanceof RubyBignum || needBignumAdd(other.getLongValue())) { | } else if ( other instanceof RubyBignum || needBignumAdd(other.getLongValue())) { | public RubyNumeric op_plus(RubyNumeric other) { if (other instanceof RubyFloat) { return RubyFloat.m_newFloat(getRuby(), getDoubleValue()).op_plus(other); } else if (other instanceof RubyBignum || needBignumAdd(other.getLongValue())) { return RubyBignum.m_newBignum(getRuby(), value).op_plus(other); } else { return m_newFixnum(value + other.getLongValue()); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/962ce6ffe87d8c8388ef1c922b056aea9b6210db/RubyFixnum.java/buggy/org/jruby/RubyFixnum.java |
return Collections.EMPTY_LIST; | return EMPTY_LIST; | public List childNodes() { return Collections.EMPTY_LIST; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/b1293eda8454686e846e2a9837b348e2983bb423/StrNode.java/clean/src/org/jruby/ast/StrNode.java |
public ImagePixel(Integer attributeId, String pixelType, Integer sizeY, Integer sizeZ, String fileSha1, String path, Integer sizeT, Long imageServerId, Integer sizeX, Integer sizeC, Integer bitsPerPixel, org.openmicroscopy.omero.model.Image image, org.openmicroscopy.omero.model.Repository repository, org.openmicroscopy.omero.model.ModuleExecution moduleExecution, Set images, Set displayOptions, Set channelComponents) { this.attributeId = attributeId; this.pixelType = pixelType; this.sizeY = sizeY; this.sizeZ = sizeZ; this.fileSha1 = fileSha1; this.path = path; this.sizeT = sizeT; this.imageServerId = imageServerId; this.sizeX = sizeX; this.sizeC = sizeC; this.bitsPerPixel = bitsPerPixel; this.image = image; this.repository = repository; this.moduleExecution = moduleExecution; this.images = images; this.displayOptions = displayOptions; this.channelComponents = channelComponents; | public ImagePixel() { | public ImagePixel(Integer attributeId, String pixelType, Integer sizeY, Integer sizeZ, String fileSha1, String path, Integer sizeT, Long imageServerId, Integer sizeX, Integer sizeC, Integer bitsPerPixel, org.openmicroscopy.omero.model.Image image, org.openmicroscopy.omero.model.Repository repository, org.openmicroscopy.omero.model.ModuleExecution moduleExecution, Set images, Set displayOptions, Set channelComponents) { this.attributeId = attributeId; this.pixelType = pixelType; this.sizeY = sizeY; this.sizeZ = sizeZ; this.fileSha1 = fileSha1; this.path = path; this.sizeT = sizeT; this.imageServerId = imageServerId; this.sizeX = sizeX; this.sizeC = sizeC; this.bitsPerPixel = bitsPerPixel; this.image = image; this.repository = repository; this.moduleExecution = moduleExecution; this.images = images; this.displayOptions = displayOptions; this.channelComponents = channelComponents; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9570ef74198a070d72e77c417c9d25244a942de2/ImagePixel.java/clean/components/common/src/org/openmicroscopy/omero/model/ImagePixel.java |
public org.openmicroscopy.omero.model.Image getImage() { | public Image getImage() { | public org.openmicroscopy.omero.model.Image getImage() { return this.image; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9570ef74198a070d72e77c417c9d25244a942de2/ImagePixel.java/clean/components/common/src/org/openmicroscopy/omero/model/ImagePixel.java |
public org.openmicroscopy.omero.model.ModuleExecution getModuleExecution() { | public ModuleExecution getModuleExecution() { | public org.openmicroscopy.omero.model.ModuleExecution getModuleExecution() { return this.moduleExecution; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9570ef74198a070d72e77c417c9d25244a942de2/ImagePixel.java/clean/components/common/src/org/openmicroscopy/omero/model/ImagePixel.java |
public org.openmicroscopy.omero.model.Repository getRepository() { | public Repository getRepository() { | public org.openmicroscopy.omero.model.Repository getRepository() { return this.repository; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9570ef74198a070d72e77c417c9d25244a942de2/ImagePixel.java/clean/components/common/src/org/openmicroscopy/omero/model/ImagePixel.java |
public void setImage(org.openmicroscopy.omero.model.Image image) { | public void setImage(Image image) { | public void setImage(org.openmicroscopy.omero.model.Image image) { this.image = image; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9570ef74198a070d72e77c417c9d25244a942de2/ImagePixel.java/clean/components/common/src/org/openmicroscopy/omero/model/ImagePixel.java |
public void setModuleExecution(org.openmicroscopy.omero.model.ModuleExecution moduleExecution) { | public void setModuleExecution(ModuleExecution moduleExecution) { | public void setModuleExecution(org.openmicroscopy.omero.model.ModuleExecution moduleExecution) { this.moduleExecution = moduleExecution; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9570ef74198a070d72e77c417c9d25244a942de2/ImagePixel.java/clean/components/common/src/org/openmicroscopy/omero/model/ImagePixel.java |
public void setRepository(org.openmicroscopy.omero.model.Repository repository) { | public void setRepository(Repository repository) { | public void setRepository(org.openmicroscopy.omero.model.Repository repository) { this.repository = repository; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9570ef74198a070d72e77c417c9d25244a942de2/ImagePixel.java/clean/components/common/src/org/openmicroscopy/omero/model/ImagePixel.java |
setEnabled(((TreeImageSet) selectedDisplay).getNumberItems() > 0); | setEnabled( ((TreeImageSet) selectedDisplay).getNumberItems() > 0); | protected void onDisplayChange(TreeImageDisplay selectedDisplay) { if (selectedDisplay == null) { setEnabled(false); return; } if (selectedDisplay.getParentDisplay() == null) { //root name = BROWSE; setEnabled(model.getSelectedBrowser().getBrowserType() == Browser.IMAGES_EXPLORER); return; } Object ho = selectedDisplay.getUserObject(); if (ho == null || !(ho instanceof DataObject)) setEnabled(false); else { Browser browser = model.getSelectedBrowser(); if (browser != null) { if (browser.getSelectedDisplays().length > 1) { setEnabled(true); name = BROWSE; return; } } if ((ho instanceof ImageData)) name = VIEW; else name = BROWSE; if (selectedDisplay instanceof TreeImageSet) { setEnabled(((TreeImageSet) selectedDisplay).getNumberItems() > 0); } else setEnabled(true); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/146920a8791fff71320ced0f240b9d8f3d319a13/ViewAction.java/clean/SRC/org/openmicroscopy/shoola/agents/treeviewer/actions/ViewAction.java |
return "</ul>"; | return "</ul>\n"; | protected String renderEndList() { return "</ul>"; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/63e182a593c47d9b882560d480b0bab109616dc8/HTMLPageRenderer.java/clean/wiki/src/org/tcdi/opensource/wiki/renderer/HTMLPageRenderer.java |
return "<hr>"; | return "<hr>\n"; | protected String renderHorizLine() { return "<hr>"; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/63e182a593c47d9b882560d480b0bab109616dc8/HTMLPageRenderer.java/clean/wiki/src/org/tcdi/opensource/wiki/renderer/HTMLPageRenderer.java |
return "<br>"; | return "<br>\n"; | protected String renderLineBreak() { return "<br>"; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/63e182a593c47d9b882560d480b0bab109616dc8/HTMLPageRenderer.java/clean/wiki/src/org/tcdi/opensource/wiki/renderer/HTMLPageRenderer.java |
return "<br><br>"; | return "<br><br>\n"; | protected String renderParagraphBreak() { return "<br><br>"; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/63e182a593c47d9b882560d480b0bab109616dc8/HTMLPageRenderer.java/clean/wiki/src/org/tcdi/opensource/wiki/renderer/HTMLPageRenderer.java |
.append ("</pre>"); | .append ("</pre>\n"); | protected String renderQuotedBlock(String text) { StringBuffer sb = new StringBuffer (text.length()); sb.append ("<pre>") .append (replace (replace (text, "<", "<"), ">", ">")) .append ("</pre>"); return sb.toString (); } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/63e182a593c47d9b882560d480b0bab109616dc8/HTMLPageRenderer.java/clean/wiki/src/org/tcdi/opensource/wiki/renderer/HTMLPageRenderer.java |
return "<ul>"; | return "<ul>\n"; | protected String renderStartList() { return "<ul>"; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/63e182a593c47d9b882560d480b0bab109616dc8/HTMLPageRenderer.java/clean/wiki/src/org/tcdi/opensource/wiki/renderer/HTMLPageRenderer.java |
list.addKeyListener(this); addKeyListener(this); | list.addKeyListener(new KeyAdapter() { public void keyReleased(KeyEvent keyEvent) { if (keyEvent.getKeyCode() == KeyEvent.VK_ESCAPE) { textField.requestFocus(); } } }); | public JContactItemField(List items, Window parentWindow) { setLayout(new BorderLayout()); this.items = items; add(textField, BorderLayout.CENTER); textField.addKeyListener(new KeyAdapter() { public void keyReleased(KeyEvent keyEvent) { char ch = keyEvent.getKeyChar(); if (validateChar(ch)) { showPopupMenu(); } if (ch == KeyEvent.VK_ENTER) { int index = list.getSelectedIndex(); if (index >= 0) { ContactItem selection = (ContactItem)list.getSelectedValue(); textField.setText(selection.getNickname()); popup.setVisible(false); } } if (ch == KeyEvent.VK_ESCAPE) { popup.setVisible(false); } dispatchEvent(keyEvent); } public void keyPressed(KeyEvent e) { if (isArrowKey(e)) { list.dispatchEvent(e); } } }); list.addKeyListener(this); addKeyListener(this); popup = new JWindow(parentWindow); popup.getContentPane().add(new JScrollPane(list)); list.setCellRenderer(new PopupRenderer()); } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/c9ce7389b3dfa04f153ea248f3c84d308fdc9c02/JContactItemField.java/clean/src/java/org/jivesoftware/spark/component/JContactItemField.java |
if (runtime.getSafeLevel() == 0) { addPath("."); } | public void init(List additionalDirectories) { // add all startup load paths to the list first for (Iterator iter = additionalDirectories.iterator(); iter.hasNext();) { addPath((String) iter.next()); } // wrap in try/catch for security exceptions in an applet try { String jrubyHome = System.getProperty("jruby.home"); if (jrubyHome != null) { char sep = '/'; String rubyDir = jrubyHome + sep + "lib" + sep + "ruby" + sep; addPath(rubyDir + "site_ruby" + sep + Constants.RUBY_MAJOR_VERSION); addPath(rubyDir + "site_ruby"); addPath(rubyDir + Constants.RUBY_MAJOR_VERSION); addPath(rubyDir + Constants.RUBY_MAJOR_VERSION + sep + "java"); // Added to make sure we find default distribution files within jar file. // TODO: Either make jrubyHome become the jar file or allow "classpath-only" paths addPath("lib" + sep + "ruby" + sep + Constants.RUBY_MAJOR_VERSION); } } catch (AccessControlException accessEx) { // ignore, we're in an applet and can't access filesystem anyway } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/df365ec2c2e8b2c1348f22f8102d3515fbe4217c/LoadService.java/clean/src/org/jruby/runtime/load/LoadService.java |
|
String filestr = allPattern.matcher(file).replaceAll("$1"); if (loadedFeaturesInternal.contains(filestr)) { return false; } smartLoad(filestr); return true; | return smartLoad(file); | public boolean require(String file) { String filestr = allPattern.matcher(file).replaceAll("$1"); if (loadedFeaturesInternal.contains(filestr)) { return false; } smartLoad(filestr); return true; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/df365ec2c2e8b2c1348f22f8102d3515fbe4217c/LoadService.java/clean/src/org/jruby/runtime/load/LoadService.java |
public void smartLoad(String file) { | public boolean smartLoad(String file) { | public void smartLoad(String file) { Library library = null; String loadName = file; String[] extensionsToSearch = null; // if an extension is specified, try more targetted searches if (file.indexOf('.') >= 0) { Matcher matcher = null; if ((matcher = sourcePattern.matcher(file)).matches()) { // source extensions extensionsToSearch = sourceSuffixes; // trim extension to try other options file = matcher.group(1); } else if ((matcher = extensionPattern.matcher(file)).matches()) { // extension extensions extensionsToSearch = extensionSuffixes; // trim extension to try other options file = matcher.group(1); } else { // unknown extension throw runtime.newLoadError("no such file to load -- " + file); } } else { // try all extensions extensionsToSearch = allSuffixes; } // First try suffixes with normal loading for (int i = 0; i < extensionsToSearch.length; i++) { library = findLibrary(file + extensionsToSearch[i]); if (library != null) { loadName = file + extensionsToSearch[i]; break; } } // Then try suffixes with classloader loading if (library == null) { for (int i = 0; i < extensionsToSearch.length; i++) { library = findLibraryWithClassloaders(file + extensionsToSearch[i]); if (library != null) { loadName = file + extensionsToSearch[i]; break; } } } library = tryLoadExtension(library,file); // no library or extension found, bail out if (library == null) { throw runtime.newLoadError("no such file to load -- " + file); } // attempt to load the found library synchronized (this) { try { loadedFeaturesInternal.add(file); loadedFeatures.add(runtime.newString(loadName)); library.load(runtime); } catch (IOException e) { loadedFeaturesInternal.remove(file); loadedFeatures.remove(runtime.newString(loadName)); throw runtime.newLoadError("IO error -- " + file); } } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/df365ec2c2e8b2c1348f22f8102d3515fbe4217c/LoadService.java/clean/src/org/jruby/runtime/load/LoadService.java |
if (file.indexOf('.') >= 0) { | if (file.lastIndexOf('.') > file.lastIndexOf('/')) { | public void smartLoad(String file) { Library library = null; String loadName = file; String[] extensionsToSearch = null; // if an extension is specified, try more targetted searches if (file.indexOf('.') >= 0) { Matcher matcher = null; if ((matcher = sourcePattern.matcher(file)).matches()) { // source extensions extensionsToSearch = sourceSuffixes; // trim extension to try other options file = matcher.group(1); } else if ((matcher = extensionPattern.matcher(file)).matches()) { // extension extensions extensionsToSearch = extensionSuffixes; // trim extension to try other options file = matcher.group(1); } else { // unknown extension throw runtime.newLoadError("no such file to load -- " + file); } } else { // try all extensions extensionsToSearch = allSuffixes; } // First try suffixes with normal loading for (int i = 0; i < extensionsToSearch.length; i++) { library = findLibrary(file + extensionsToSearch[i]); if (library != null) { loadName = file + extensionsToSearch[i]; break; } } // Then try suffixes with classloader loading if (library == null) { for (int i = 0; i < extensionsToSearch.length; i++) { library = findLibraryWithClassloaders(file + extensionsToSearch[i]); if (library != null) { loadName = file + extensionsToSearch[i]; break; } } } library = tryLoadExtension(library,file); // no library or extension found, bail out if (library == null) { throw runtime.newLoadError("no such file to load -- " + file); } // attempt to load the found library synchronized (this) { try { loadedFeaturesInternal.add(file); loadedFeatures.add(runtime.newString(loadName)); library.load(runtime); } catch (IOException e) { loadedFeaturesInternal.remove(file); loadedFeatures.remove(runtime.newString(loadName)); throw runtime.newLoadError("IO error -- " + file); } } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/df365ec2c2e8b2c1348f22f8102d3515fbe4217c/LoadService.java/clean/src/org/jruby/runtime/load/LoadService.java |
synchronized (this) { try { loadedFeaturesInternal.add(file); loadedFeatures.add(runtime.newString(loadName)); | try { loadedFeaturesInternal.add(loadName); loadedFeatures.add(runtime.newString(loadName)); | public void smartLoad(String file) { Library library = null; String loadName = file; String[] extensionsToSearch = null; // if an extension is specified, try more targetted searches if (file.indexOf('.') >= 0) { Matcher matcher = null; if ((matcher = sourcePattern.matcher(file)).matches()) { // source extensions extensionsToSearch = sourceSuffixes; // trim extension to try other options file = matcher.group(1); } else if ((matcher = extensionPattern.matcher(file)).matches()) { // extension extensions extensionsToSearch = extensionSuffixes; // trim extension to try other options file = matcher.group(1); } else { // unknown extension throw runtime.newLoadError("no such file to load -- " + file); } } else { // try all extensions extensionsToSearch = allSuffixes; } // First try suffixes with normal loading for (int i = 0; i < extensionsToSearch.length; i++) { library = findLibrary(file + extensionsToSearch[i]); if (library != null) { loadName = file + extensionsToSearch[i]; break; } } // Then try suffixes with classloader loading if (library == null) { for (int i = 0; i < extensionsToSearch.length; i++) { library = findLibraryWithClassloaders(file + extensionsToSearch[i]); if (library != null) { loadName = file + extensionsToSearch[i]; break; } } } library = tryLoadExtension(library,file); // no library or extension found, bail out if (library == null) { throw runtime.newLoadError("no such file to load -- " + file); } // attempt to load the found library synchronized (this) { try { loadedFeaturesInternal.add(file); loadedFeatures.add(runtime.newString(loadName)); library.load(runtime); } catch (IOException e) { loadedFeaturesInternal.remove(file); loadedFeatures.remove(runtime.newString(loadName)); throw runtime.newLoadError("IO error -- " + file); } } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/df365ec2c2e8b2c1348f22f8102d3515fbe4217c/LoadService.java/clean/src/org/jruby/runtime/load/LoadService.java |
library.load(runtime); } catch (IOException e) { loadedFeaturesInternal.remove(file); loadedFeatures.remove(runtime.newString(loadName)); | library.load(runtime); return true; } catch (IOException e) { loadedFeaturesInternal.remove(loadName); loadedFeatures.remove(runtime.newString(loadName)); | public void smartLoad(String file) { Library library = null; String loadName = file; String[] extensionsToSearch = null; // if an extension is specified, try more targetted searches if (file.indexOf('.') >= 0) { Matcher matcher = null; if ((matcher = sourcePattern.matcher(file)).matches()) { // source extensions extensionsToSearch = sourceSuffixes; // trim extension to try other options file = matcher.group(1); } else if ((matcher = extensionPattern.matcher(file)).matches()) { // extension extensions extensionsToSearch = extensionSuffixes; // trim extension to try other options file = matcher.group(1); } else { // unknown extension throw runtime.newLoadError("no such file to load -- " + file); } } else { // try all extensions extensionsToSearch = allSuffixes; } // First try suffixes with normal loading for (int i = 0; i < extensionsToSearch.length; i++) { library = findLibrary(file + extensionsToSearch[i]); if (library != null) { loadName = file + extensionsToSearch[i]; break; } } // Then try suffixes with classloader loading if (library == null) { for (int i = 0; i < extensionsToSearch.length; i++) { library = findLibraryWithClassloaders(file + extensionsToSearch[i]); if (library != null) { loadName = file + extensionsToSearch[i]; break; } } } library = tryLoadExtension(library,file); // no library or extension found, bail out if (library == null) { throw runtime.newLoadError("no such file to load -- " + file); } // attempt to load the found library synchronized (this) { try { loadedFeaturesInternal.add(file); loadedFeatures.add(runtime.newString(loadName)); library.load(runtime); } catch (IOException e) { loadedFeaturesInternal.remove(file); loadedFeatures.remove(runtime.newString(loadName)); throw runtime.newLoadError("IO error -- " + file); } } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/df365ec2c2e8b2c1348f22f8102d3515fbe4217c/LoadService.java/clean/src/org/jruby/runtime/load/LoadService.java |
throw runtime.newLoadError("IO error -- " + file); } | throw runtime.newLoadError("IO error -- " + file); | public void smartLoad(String file) { Library library = null; String loadName = file; String[] extensionsToSearch = null; // if an extension is specified, try more targetted searches if (file.indexOf('.') >= 0) { Matcher matcher = null; if ((matcher = sourcePattern.matcher(file)).matches()) { // source extensions extensionsToSearch = sourceSuffixes; // trim extension to try other options file = matcher.group(1); } else if ((matcher = extensionPattern.matcher(file)).matches()) { // extension extensions extensionsToSearch = extensionSuffixes; // trim extension to try other options file = matcher.group(1); } else { // unknown extension throw runtime.newLoadError("no such file to load -- " + file); } } else { // try all extensions extensionsToSearch = allSuffixes; } // First try suffixes with normal loading for (int i = 0; i < extensionsToSearch.length; i++) { library = findLibrary(file + extensionsToSearch[i]); if (library != null) { loadName = file + extensionsToSearch[i]; break; } } // Then try suffixes with classloader loading if (library == null) { for (int i = 0; i < extensionsToSearch.length; i++) { library = findLibraryWithClassloaders(file + extensionsToSearch[i]); if (library != null) { loadName = file + extensionsToSearch[i]; break; } } } library = tryLoadExtension(library,file); // no library or extension found, bail out if (library == null) { throw runtime.newLoadError("no such file to load -- " + file); } // attempt to load the found library synchronized (this) { try { loadedFeaturesInternal.add(file); loadedFeatures.add(runtime.newString(loadName)); library.load(runtime); } catch (IOException e) { loadedFeaturesInternal.remove(file); loadedFeatures.remove(runtime.newString(loadName)); throw runtime.newLoadError("IO error -- " + file); } } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/df365ec2c2e8b2c1348f22f8102d3515fbe4217c/LoadService.java/clean/src/org/jruby/runtime/load/LoadService.java |
public void clean(OMEModel modelObject); | public void clean(Set setOfModelObjects); | public void clean(OMEModel modelObject); | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0ba7f2b0f6ac6ae4e3bfb54aaea6ebb7394f1370/DaoUtils.java/buggy/components/server/src/org/openmicroscopy/omero/logic/DaoUtils.java |
return null; | return block; | public static final Object build(BuildContext rc, Object name, Macro block) throws BuildException { if (name instanceof Macro) { throw new BuildException( "Profile name must be a static string, not a dynamic macro"); } if (Flags.PROFILE) { return new ProfileDirective(name.toString(), block); } else { return null; } } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/caae30b46935100916e734c44f76582390ec531e/ProfileDirective.java/clean/webmacro/src/org/webmacro/engine/ProfileDirective.java |
if (!_list) { | if (_list && _listType != LIST_TYPE_NORMAL) endList(); if (!_list) { | public void li() { if (!_list) { newData(); _currentData.setType(WikiDataTypes.START_LIST); _list = true; } newData(); _currentData.setType(WikiDataTypes.LI); } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/63e182a593c47d9b882560d480b0bab109616dc8/DefaultPageBuilder.java/buggy/wiki/src/org/tcdi/opensource/wiki/builder/DefaultPageBuilder.java |
_listType = LIST_TYPE_NORMAL; | public void li() { if (!_list) { newData(); _currentData.setType(WikiDataTypes.START_LIST); _list = true; } newData(); _currentData.setType(WikiDataTypes.LI); } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/63e182a593c47d9b882560d480b0bab109616dc8/DefaultPageBuilder.java/buggy/wiki/src/org/tcdi/opensource/wiki/builder/DefaultPageBuilder.java |
|
if (_list) { newData(); _currentData.setType(WikiDataTypes.END_LIST); _list = false; } | if (_list) endList(); | public void paragraph() { finishFormatting (); if (_list) { newData(); _currentData.setType(WikiDataTypes.END_LIST); _list = false; } newData (); _currentData.setType (WikiDataTypes.PARAGRAPH_BREAK); } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/63e182a593c47d9b882560d480b0bab109616dc8/DefaultPageBuilder.java/buggy/wiki/src/org/tcdi/opensource/wiki/builder/DefaultPageBuilder.java |
RubyArray instance = getRuntime().newArray(); | RubyArray instance = (RubyArray)allocateObject(); | public IRubyObject newInstance(IRubyObject[] args) { RubyArray instance = getRuntime().newArray(); instance.setMetaClass(this); instance.callInit(args); return instance; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/4464dc9d096f5840c7920b6bc0d4de218d241503/ArrayMetaClass.java/clean/src/org/jruby/runtime/builtin/meta/ArrayMetaClass.java |
public void defineSingletonMethod(String name, Arity arity, String java_name) { assert name != null; assert arity != null; assert java_name != null; Visibility visibility = name.equals("initialize") ? Visibility.PRIVATE : Visibility.PUBLIC; getSingletonClass().addMethod( name, new ReflectedMethod(this, getClass(), java_name, arity, visibility)); | public void defineSingletonMethod(String name, Arity arity) { defineSingletonMethod(name, arity, name); | public void defineSingletonMethod(String name, Arity arity, String java_name) { assert name != null; assert arity != null; assert java_name != null; Visibility visibility = name.equals("initialize") ? Visibility.PRIVATE : Visibility.PUBLIC; getSingletonClass().addMethod( name, new ReflectedMethod(this, getClass(), java_name, arity, visibility)); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/AbstractMetaClass.java/buggy/src/org/jruby/runtime/builtin/meta/AbstractMetaClass.java |
gbc.weightx = 30.0; gbc.weighty = 30.0; | gbc.weightx = 1600.0; gbc.weighty = 600.0; gbc.fill = gbc.BOTH; | void createUI() { createWheel(); createHSVSlider(); createAlphaSlider(); createAlphaTextbox(); JPanel container = new JPanel(); GridBagConstraints gbc = new GridBagConstraints(); container.setLayout(new GridBagLayout()); gbc.anchor = GridBagConstraints.WEST; gbc.weightx = 30.0; gbc.weighty = 30.0; //gbc.fill = gbc.BOTH; //setLayout(new FlowLayout()); container.add(wheel, gbc); gbc.gridx = 1; container.add(HSVSlider,gbc); // JPanel p = new JPanel(); GridBagConstraints c = new GridBagConstraints(); c.anchor = GridBagConstraints.WEST; c.weightx = 0.0; p.setLayout(new GridBagLayout()); c.fill = gbc.VERTICAL; p.add(alphaSlider, c); c.gridx = 1; p.add(alphaTextbox, c); gbc.fill = gbc.BOTH; //setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); setLayout(new GridBagLayout()); gbc.gridx =0; gbc.gridy = 0; add(container,gbc); //add(UIUtilities.buildComponentPanel(p)); gbc.gridy = 1; add(p,gbc); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/aee0e250d4d2f1c66384c6e4e9200175b78ee7cd/HSVColourWheelUI.java/buggy/SRC/org/openmicroscopy/shoola/util/ui/colourpicker/HSVColourWheelUI.java |
gbc.weighty = 15; | void createUI() { createWheel(); createHSVSlider(); createAlphaSlider(); createAlphaTextbox(); JPanel container = new JPanel(); GridBagConstraints gbc = new GridBagConstraints(); container.setLayout(new GridBagLayout()); gbc.anchor = GridBagConstraints.WEST; gbc.weightx = 30.0; gbc.weighty = 30.0; //gbc.fill = gbc.BOTH; //setLayout(new FlowLayout()); container.add(wheel, gbc); gbc.gridx = 1; container.add(HSVSlider,gbc); // JPanel p = new JPanel(); GridBagConstraints c = new GridBagConstraints(); c.anchor = GridBagConstraints.WEST; c.weightx = 0.0; p.setLayout(new GridBagLayout()); c.fill = gbc.VERTICAL; p.add(alphaSlider, c); c.gridx = 1; p.add(alphaTextbox, c); gbc.fill = gbc.BOTH; //setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); setLayout(new GridBagLayout()); gbc.gridx =0; gbc.gridy = 0; add(container,gbc); //add(UIUtilities.buildComponentPanel(p)); gbc.gridy = 1; add(p,gbc); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/aee0e250d4d2f1c66384c6e4e9200175b78ee7cd/HSVColourWheelUI.java/buggy/SRC/org/openmicroscopy/shoola/util/ui/colourpicker/HSVColourWheelUI.java |
|
void init(Ruby runtime, List additionalDirectories); | void init(List additionalDirectories); | void init(Ruby runtime, List additionalDirectories); | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/61503e7396c70acb6ed9f50922ff044d1fcc4bcc/ILoadService.java/buggy/src/org/jruby/runtime/load/ILoadService.java |
String ls = System.getProperty("line.separator"); if (!modes.isBinary() && !"\n".equals(ls)) { shouldReplace = true; if ("\r".equals(ls)) { isWin = false; } } | public IOHandlerSeekable(IRuby runtime, String path, IOModes modes) throws IOException, InvalidValueException { super(runtime); this.path = path; this.modes = modes; JRubyFile theFile = JRubyFile.create(runtime.getCurrentDirectory(),path); if (theFile.exists()) { if (modes.shouldTruncate()) { // If we only want to open for writing we should remove // the old file before opening the fresh one. If it fails // to remove it we should do something? if (!theFile.delete()) { } } } else { if (modes.isReadable() && !modes.isWriteable()) { throw new FileNotFoundException(); } } // Do not open as 'rw' if we don't need to since a file with permissions for read-only // will barf if opened 'rw'. String javaMode = "r"; if (modes.isWriteable()) { javaMode += "w"; } // We always open this rw since we can only open it r or rw. file = new RandomAccessFile(theFile, javaMode); isOpen = true; if (modes.isAppendable()) { seek(0, SEEK_END); } // We give a fileno last so that we do not consume these when // we have a problem opening a file. fileno = RubyIO.getNewFileno(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/4b12521bf34cff2c9841b1dacb1a929f6def5327/IOHandlerSeekable.java/buggy/src/org/jruby/util/IOHandlerSeekable.java |
|
return file.read(); | if(!shouldReplace) { return file.read(); } else { int curr = file.read(); if (curr != '\r') { return curr; } else if (!isWin) { return '\n'; } else { int next = file.read(); if(next == '\n') { return next; } file.seek(file.getFilePointer() - 1); return curr; } } | public int sysread() throws IOException { return file.read(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/4b12521bf34cff2c9841b1dacb1a929f6def5327/IOHandlerSeekable.java/buggy/src/org/jruby/util/IOHandlerSeekable.java |
if (!isOpen) { throw new BadDescriptorException(); } if (!modes.isWriteable()) { throw new IOException("not opened for writing"); } | checkWritable(); | protected void checkWriteable() throws IOException, BadDescriptorException { if (!isOpen) { throw new BadDescriptorException(); } if (!modes.isWriteable()) { throw new IOException("not opened for writing"); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/54e6b8da799629e0b7db879c45149399878f5f84/IOHandler.java/buggy/src/org/jruby/util/IOHandler.java |
throw new BadDescriptorException(); | throw new BadDescriptorException(); | protected void checkReadable() throws IOException, BadDescriptorException { if (!isOpen) { throw new BadDescriptorException(); } if (!modes.isReadable()) { throw new IOException("not opened for reading"); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/54e6b8da799629e0b7db879c45149399878f5f84/IOHandler.java/buggy/src/org/jruby/util/IOHandler.java |
FileInputStream stream = null; | InputStream stream = null; | private byte[] loadClassBytes(String name) throws ClassNotFoundException { FileInputStream stream = null; try { String fileName = name.replaceAll("\\.", "/"); fileName += ".class"; File file = new File("build/classes/test", fileName); byte[] bytes = new byte[(int) file.length()]; stream = new FileInputStream(file); stream.read(bytes); return bytes; } catch (Exception e) { e.printStackTrace(); throw new ClassNotFoundException(e.getMessage(),e); } finally { if (stream != null) try { stream.close(); } catch (IOException e1) { e1.printStackTrace(); } } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/5824da07523b18e569515e71bd0efab31291d7ec/TestHelper.java/buggy/test/org/jruby/test/TestHelper.java |
File file = new File("build/classes/test", fileName); byte[] bytes = new byte[(int) file.length()]; stream = new FileInputStream(file); stream.read(bytes); return bytes; | byte[] buf = new byte[1024]; ByteArrayOutputStream bytes = new ByteArrayOutputStream(); int bytesRead = 0; stream = getClass().getResourceAsStream("/" + fileName); while ((bytesRead = stream.read(buf)) != -1) { bytes.write(buf, 0, bytesRead); } return bytes.toByteArray(); | private byte[] loadClassBytes(String name) throws ClassNotFoundException { FileInputStream stream = null; try { String fileName = name.replaceAll("\\.", "/"); fileName += ".class"; File file = new File("build/classes/test", fileName); byte[] bytes = new byte[(int) file.length()]; stream = new FileInputStream(file); stream.read(bytes); return bytes; } catch (Exception e) { e.printStackTrace(); throw new ClassNotFoundException(e.getMessage(),e); } finally { if (stream != null) try { stream.close(); } catch (IOException e1) { e1.printStackTrace(); } } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/5824da07523b18e569515e71bd0efab31291d7ec/TestHelper.java/buggy/test/org/jruby/test/TestHelper.java |
for (int j=0; j<findBytes.length; j++) classBytes[i+j] = replaceBytes[j]; | for (int j=0; j<findBytes.length; j++) classBytes[i+j] = replaceBytes[j]; | private void replace(byte[] classBytes, String find, String replaceWith) { byte[] findBytes = find.getBytes(); byte[] replaceBytes = replaceWith.getBytes(); for (int i=0; i<classBytes.length; i++) { boolean match = true; for (int j=0; j<findBytes.length; j++) { if (classBytes[i+j] != findBytes[j]) { match = false; break; } } if (match) { for (int j=0; j<findBytes.length; j++) classBytes[i+j] = replaceBytes[j]; return; } } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/5824da07523b18e569515e71bd0efab31291d7ec/TestHelper.java/buggy/test/org/jruby/test/TestHelper.java |
public String dispatchObject(Object iObject) { if (iObject == null) { return null; } return iObject.toString(); | public String dispatchObject(Object iObject) { return iObject == null ? null : iObject.toString(); | public String dispatchObject(Object iObject) { if (iObject == null) { return null; } return iObject.toString(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/5824da07523b18e569515e71bd0efab31291d7ec/TestHelper.java/buggy/test/org/jruby/test/TestHelper.java |
return klass.getName(); | return klass.getName(); | public static String getClassName(Class klass) { return klass.getName(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/5824da07523b18e569515e71bd0efab31291d7ec/TestHelper.java/buggy/test/org/jruby/test/TestHelper.java |
throws Throwable { | throws Throwable { | public static IRubyObject loadAndCall(IRubyObject self, String name, byte[] javaClass, String methodName) throws Throwable { Loader loader = new Loader(); Class c = loader.loadClass(name, javaClass); Method method = c.getMethod(methodName, new Class[] { IRuby.class, IRubyObject.class }); IRuby runtime = self.getRuntime(); runtime.getCurrentContext().pushRubyClass(self.getType()); try { return (IRubyObject) method.invoke(null, new Object[] { runtime, self }); } catch (InvocationTargetException e) { throw unrollException(e); } finally { runtime.getCurrentContext().popRubyClass(); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/5824da07523b18e569515e71bd0efab31291d7ec/TestHelper.java/buggy/test/org/jruby/test/TestHelper.java |
runtime.getCurrentContext().pushRubyClass(self.getType()); | runtime.getCurrentContext().pushRubyClass(self.getType()); | public static IRubyObject loadAndCall(IRubyObject self, String name, byte[] javaClass, String methodName) throws Throwable { Loader loader = new Loader(); Class c = loader.loadClass(name, javaClass); Method method = c.getMethod(methodName, new Class[] { IRuby.class, IRubyObject.class }); IRuby runtime = self.getRuntime(); runtime.getCurrentContext().pushRubyClass(self.getType()); try { return (IRubyObject) method.invoke(null, new Object[] { runtime, self }); } catch (InvocationTargetException e) { throw unrollException(e); } finally { runtime.getCurrentContext().popRubyClass(); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/5824da07523b18e569515e71bd0efab31291d7ec/TestHelper.java/buggy/test/org/jruby/test/TestHelper.java |
TestHelper helper = new TestHelper("A"); helper.privateMethod(); TestHelper.staticPrivateMethod(); | TestHelper helper = new TestHelper("A"); helper.privateMethod(); TestHelper.staticPrivateMethod(); | public static void removeWarningsFromEclipse() { TestHelper helper = new TestHelper("A"); helper.privateMethod(); TestHelper.staticPrivateMethod(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/5824da07523b18e569515e71bd0efab31291d7ec/TestHelper.java/buggy/test/org/jruby/test/TestHelper.java |
personalPanel.setJID(vcard.getJabberId()); | private void populateVCardUI(VCard vcard) { personalPanel.setFirstName(vcard.getFirstName()); personalPanel.setMiddleName(vcard.getMiddleName()); personalPanel.setLastName(vcard.getLastName()); personalPanel.setEmailAddress(vcard.getEmailHome()); personalPanel.setNickname(vcard.getNickName()); businessPanel.setCompany(vcard.getOrganization()); businessPanel.setDepartment(vcard.getOrganizationUnit()); businessPanel.setStreetAddress(vcard.getAddressFieldWork("STREET")); businessPanel.setCity(vcard.getAddressFieldWork("LOCALITY")); businessPanel.setState(vcard.getAddressFieldWork("REGION")); businessPanel.setZipCode(vcard.getAddressFieldWork("PCODE")); businessPanel.setCountry(vcard.getAddressFieldWork("CTRY")); businessPanel.setJobTitle(vcard.getField("TITLE")); businessPanel.setPhone(vcard.getPhoneWork("VOICE")); businessPanel.setFax(vcard.getPhoneWork("FAX")); businessPanel.setPager(vcard.getPhoneWork("PAGER")); businessPanel.setMobile(vcard.getPhoneWork("CELL")); businessPanel.setWebPage(vcard.getField("URL")); // Load Home Info homePanel.setStreetAddress(vcard.getAddressFieldHome("STREET")); homePanel.setCity(vcard.getAddressFieldHome("LOCALITY")); homePanel.setState(vcard.getAddressFieldHome("REGION")); homePanel.setZipCode(vcard.getAddressFieldHome("PCODE")); homePanel.setCountry(vcard.getAddressFieldHome("CTRY")); homePanel.setPhone(vcard.getPhoneHome("VOICE")); homePanel.setFax(vcard.getPhoneHome("FAX")); homePanel.setPager(vcard.getPhoneHome("PAGER")); homePanel.setMobile(vcard.getPhoneHome("CELL")); // Set avatar byte[] bytes = vcard.getAvatar(); if (bytes != null) { ImageIcon icon = new ImageIcon(bytes); avatarPanel.setAvatar(icon); avatarPanel.setAvatarBytes(bytes); if (avatarLabel != null) { icon = GraphicUtils.scaleImageIcon(icon, 48, 48); avatarLabel.setIcon(icon); } } } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/0807e1b794eeaa6c07d31a5c351697146a85040b/VCardManager.java/buggy/src/java/org/jivesoftware/sparkimpl/profile/VCardManager.java |
|
personalPanel.showJID(true); | private void showUserProfile(String jid, VCard vcard, JComponent parent) { final JTabbedPane tabbedPane = new JTabbedPane(); personalPanel = new PersonalPanel(); tabbedPane.addTab("Personal", personalPanel); businessPanel = new BusinessPanel(); tabbedPane.addTab("Business", businessPanel); homePanel = new HomePanel(); tabbedPane.addTab("Home", homePanel); avatarPanel = new AvatarPanel(); avatarPanel.setEditable(false); personalPanel.allowEditing(false); businessPanel.allowEditing(false); homePanel.allowEditing(false); final JOptionPane pane; final JFrame dlg; avatarLabel = new JLabel(); avatarLabel.setHorizontalAlignment(JButton.RIGHT); avatarLabel.setBorder(new PartialLineBorder(Color.gray, 1)); // Construct main panel w/ layout. final JPanel mainPanel = new JPanel(); mainPanel.setLayout(new GridBagLayout()); mainPanel.add(avatarLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0)); // The user should only be able to close this dialog. Object[] options = {"Close"}; pane = new JOptionPane(tabbedPane, JOptionPane.PLAIN_MESSAGE, JOptionPane.OK_CANCEL_OPTION, null, options, options[0]); mainPanel.add(pane, new GridBagConstraints(0, 1, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 5, 5, 5), 0, 0)); dlg = new JFrame("Viewing Profile For " + jid); dlg.setIconImage(SparkRes.getImageIcon(SparkRes.SMALL_PROFILE_IMAGE).getImage()); dlg.pack(); dlg.setSize(500, 400); dlg.setResizable(true); dlg.setContentPane(mainPanel); dlg.setLocationRelativeTo(parent); PropertyChangeListener changeListener = new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent e) { if (pane.getValue() instanceof Integer) { pane.removePropertyChangeListener(this); dlg.dispose(); return; } String value = (String)pane.getValue(); if ("Close".equals(value)) { pane.removePropertyChangeListener(this); dlg.dispose(); } } }; pane.addPropertyChangeListener(changeListener); dlg.addKeyListener(new KeyAdapter() { public void keyPressed(KeyEvent keyEvent) { if (keyEvent.getKeyChar() == KeyEvent.VK_ESCAPE) { dlg.dispose(); } } }); populateVCardUI(vcard); dlg.setVisible(true); dlg.toFront(); dlg.requestFocus(); } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/0807e1b794eeaa6c07d31a5c351697146a85040b/VCardManager.java/buggy/src/java/org/jivesoftware/sparkimpl/profile/VCardManager.java |
|
return "<" + (isClass() ? "Class" : "Module") + " 01x" + | return "#<" + (isClass() ? "Class" : "Module") + ":01x" + | public String getName() { RubyModule module = this; while (module.isIncluded() || module.isSingleton()) { module = module.getSuperClass(); } if (classId == null) { return "<" + (isClass() ? "Class" : "Module") + " 01x" + Integer.toHexString(System.identityHashCode(this)) + ">"; } StringBuffer result = new StringBuffer(classId); RubyClass objectClass = getRuntime().getClasses().getObjectClass(); for (RubyModule current = this.parentModule; current != objectClass && current != this; current = current.parentModule) { assert current != null; result.insert(0, "::").insert(0, current.classId); } return result.toString(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/3ede202d0612738913c251608fd955d6b23c9527/RubyModule.java/buggy/src/org/jruby/RubyModule.java |
return delegate.checkProperty(arg0, arg1); | return localQuery.checkProperty(arg0, arg1); | @RolesAllowed("user") public boolean checkProperty(String arg0, String arg1) { return delegate.checkProperty(arg0, arg1); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/dc8dde051a1e2b716514b3964c9222ce006ebea9/QueryBean.java/buggy/components/ejb/src/ome/ro/ejb/QueryBean.java |
return delegate.checkType(arg0); | return localQuery.checkType(arg0); | @RolesAllowed("user") public boolean checkType(String arg0) { return delegate.checkType(arg0); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/dc8dde051a1e2b716514b3964c9222ce006ebea9/QueryBean.java/buggy/components/ejb/src/ome/ro/ejb/QueryBean.java |
delegate = (LocalQuery) applicationContext.getBean( IQuery.class.getName()); | public void create() { super.create(); delegate = (LocalQuery) applicationContext.getBean( IQuery.class.getName()); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/dc8dde051a1e2b716514b3964c9222ce006ebea9/QueryBean.java/buggy/components/ejb/src/ome/ro/ejb/QueryBean.java |
|
delegate = null; | localQuery = null; | public void destroy() { delegate = null; super.destroy(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/dc8dde051a1e2b716514b3964c9222ce006ebea9/QueryBean.java/buggy/components/ejb/src/ome/ro/ejb/QueryBean.java |
delegate.evict(arg0); | localQuery.evict(arg0); | @RolesAllowed("user") public void evict(Object arg0) { delegate.evict(arg0); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/dc8dde051a1e2b716514b3964c9222ce006ebea9/QueryBean.java/buggy/components/ejb/src/ome/ro/ejb/QueryBean.java |
return delegate.execute(arg0); | return localQuery.execute(arg0); | @RolesAllowed("user") public Object execute(Query arg0) { return delegate.execute(arg0); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/dc8dde051a1e2b716514b3964c9222ce006ebea9/QueryBean.java/buggy/components/ejb/src/ome/ro/ejb/QueryBean.java |
return delegate.find(arg0, arg1); | return localQuery.find(arg0, arg1); | @RolesAllowed("user") public IObject find(Class arg0, long arg1) { return delegate.find(arg0, arg1); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/dc8dde051a1e2b716514b3964c9222ce006ebea9/QueryBean.java/buggy/components/ejb/src/ome/ro/ejb/QueryBean.java |
return delegate.findAll(arg0, arg1); | return localQuery.findAll(arg0, arg1); | @RolesAllowed("user") public List findAll(Class arg0, Filter arg1) { return delegate.findAll(arg0, arg1); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/dc8dde051a1e2b716514b3964c9222ce006ebea9/QueryBean.java/buggy/components/ejb/src/ome/ro/ejb/QueryBean.java |
return delegate.findAllByExample(arg0, arg1); | return localQuery.findAllByExample(arg0, arg1); | @RolesAllowed("user") public List findAllByExample(IObject arg0, Filter arg1) { return delegate.findAllByExample(arg0, arg1); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/dc8dde051a1e2b716514b3964c9222ce006ebea9/QueryBean.java/buggy/components/ejb/src/ome/ro/ejb/QueryBean.java |
return delegate.findAllByQuery(arg0, arg1); | return localQuery.findAllByQuery(arg0, arg1); | @RolesAllowed("user") public List findAllByQuery(String arg0, Parameters arg1) { return delegate.findAllByQuery(arg0, arg1); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/dc8dde051a1e2b716514b3964c9222ce006ebea9/QueryBean.java/buggy/components/ejb/src/ome/ro/ejb/QueryBean.java |
return delegate.findAllByString(arg0, arg1, arg2, arg3, arg4); | return localQuery.findAllByString(arg0, arg1, arg2, arg3, arg4); | @RolesAllowed("user") public List findAllByString(Class arg0, String arg1, String arg2, boolean arg3, Filter arg4) { return delegate.findAllByString(arg0, arg1, arg2, arg3, arg4); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/dc8dde051a1e2b716514b3964c9222ce006ebea9/QueryBean.java/buggy/components/ejb/src/ome/ro/ejb/QueryBean.java |
return delegate.findByExample(arg0); | return localQuery.findByExample(arg0); | @RolesAllowed("user") public IObject findByExample(IObject arg0) throws ApiUsageException { return delegate.findByExample(arg0); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/dc8dde051a1e2b716514b3964c9222ce006ebea9/QueryBean.java/buggy/components/ejb/src/ome/ro/ejb/QueryBean.java |
return delegate.findByQuery(arg0, arg1); | return localQuery.findByQuery(arg0, arg1); | @RolesAllowed("user") public IObject findByQuery(String arg0, Parameters arg1) throws ValidationException { return delegate.findByQuery(arg0, arg1); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/dc8dde051a1e2b716514b3964c9222ce006ebea9/QueryBean.java/buggy/components/ejb/src/ome/ro/ejb/QueryBean.java |
return delegate.findByString(arg0, arg1, arg2); | return localQuery.findByString(arg0, arg1, arg2); | @RolesAllowed("user") public IObject findByString(Class arg0, String arg1, String arg2) throws ApiUsageException { return delegate.findByString(arg0, arg1, arg2); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/dc8dde051a1e2b716514b3964c9222ce006ebea9/QueryBean.java/buggy/components/ejb/src/ome/ro/ejb/QueryBean.java |
return delegate.get(arg0, arg1); | return localQuery.get(arg0, arg1); | @RolesAllowed("user") public IObject get(Class arg0, long arg1) throws ValidationException { return delegate.get(arg0, arg1); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/dc8dde051a1e2b716514b3964c9222ce006ebea9/QueryBean.java/buggy/components/ejb/src/ome/ro/ejb/QueryBean.java |
delegate.initialize(arg0); | localQuery.initialize(arg0); | @RolesAllowed("user") public void initialize(Object arg0) { delegate.initialize(arg0); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/dc8dde051a1e2b716514b3964c9222ce006ebea9/QueryBean.java/buggy/components/ejb/src/ome/ro/ejb/QueryBean.java |
return wrap( context, "&queryService" ); | return wrap( context, IQuery.class ); | public Object invoke( InvocationContext context ) throws Exception { return wrap( context, "&queryService" ); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/dc8dde051a1e2b716514b3964c9222ce006ebea9/QueryBean.java/buggy/components/ejb/src/ome/ro/ejb/QueryBean.java |
buffer.close(); | if (buffer != null) buffer.close(); | public void destroy() { super.destroy(); // id is the only thing passivated. ioService = null; file = null; try { buffer.close(); } catch (IOException e) { e.printStackTrace(); throw new ResourceError(e.getMessage()); } buffer = null; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/050d26f0ffe472a85912c497dd53df40527ed6cd/RawFileBean.java/buggy/components/server/src/ome/services/RawFileBean.java |
buffer.close(); | if (buffer != null) buffer.close(); | public void setFileId(long fileId) { if (id == null || id.longValue() != fileId) { id = new Long(fileId); file = null; try { buffer.close(); } catch (IOException e) { e.printStackTrace(); throw new ResourceError(e.getMessage()); } buffer = null; file = iQuery.get(OriginalFile.class, id); buffer = ioService.getFileBuffer(file); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/050d26f0ffe472a85912c497dd53df40527ed6cd/RawFileBean.java/buggy/components/server/src/ome/services/RawFileBean.java |
ServiceFactory factory = new ServiceFactory( (OmeroContext) applicationContext ); | factory = new ServiceFactory( (OmeroContext) applicationContext ); | protected void onSetUp() throws Exception { ServiceFactory factory = new ServiceFactory( (OmeroContext) applicationContext ); iQuery = (LocalQuery) factory.getQueryService(); iUpdate = (LocalUpdate) factory.getUpdateService(); iAdmin = factory.getAdminService(); iAnalysis = factory.getAnalysisService(); iPojos = factory.getPojosService(); iPixels = factory.getPixelsService(); eContext = (EventContext) applicationContext.getBean("eventContext"); loginRoot(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/dc8dde051a1e2b716514b3964c9222ce006ebea9/AbstractManagedContextTest.java/clean/components/server/test/ome/server/itests/AbstractManagedContextTest.java |
data = new OMEData(); data.setDataSource((DataSource) applicationContext.getBean("dataSource")); | protected void onSetUp() throws Exception { ServiceFactory factory = new ServiceFactory( (OmeroContext) applicationContext ); iQuery = (LocalQuery) factory.getQueryService(); iUpdate = (LocalUpdate) factory.getUpdateService(); iAdmin = factory.getAdminService(); iAnalysis = factory.getAnalysisService(); iPojos = factory.getPojosService(); iPixels = factory.getPixelsService(); eContext = (EventContext) applicationContext.getBean("eventContext"); loginRoot(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/dc8dde051a1e2b716514b3964c9222ce006ebea9/AbstractManagedContextTest.java/clean/components/server/test/ome/server/itests/AbstractManagedContextTest.java |
|
public BrowserController getActiveBrowser() | public UIWrapper getActiveBrowser() | public BrowserController getActiveBrowser() { return (BrowserController)browserList.get(0); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a74dcf148f6dd7ae6d4c17a9e0406afba262a755/BrowserManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/BrowserManager.java |
return (BrowserController)browserList.get(0); | return (UIWrapper)browserList.get(0); | public BrowserController getActiveBrowser() { return (BrowserController)browserList.get(0); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a74dcf148f6dd7ae6d4c17a9e0406afba262a755/BrowserManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/BrowserManager.java |
delegate.addAll(Collections.nCopies(-index, autoResizeObject)); | delegate.addAll(0, Collections.nCopies(-index, autoResizeObject)); | protected void autoResize(int index) { if (!autoResize) { return; } else if (index < 0) { delegate.addAll(Collections.nCopies(-index, autoResizeObject)); position += -index; } else if (index >= delegate.size()) { for (int i = delegate.size(); i <= index; i++) { delegate.add(autoResizeObject); } } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/59743974f1f8d5a50153b05647dac2d75d510976/DefaultPointer.java/buggy/org/jruby/util/DefaultPointer.java |
delegate.ensureCapacity(index); | protected void autoResize(int index) { if (!autoResize) { return; } else if (index < 0) { delegate.addAll(Collections.nCopies(-index, autoResizeObject)); position += -index; } else if (index >= delegate.size()) { for (int i = delegate.size(); i <= index; i++) { delegate.add(autoResizeObject); } } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/59743974f1f8d5a50153b05647dac2d75d510976/DefaultPointer.java/buggy/org/jruby/util/DefaultPointer.java |
|
wData = Helper.createPlane(planeDef, w, metadata, pixels); | wData = PlaneFactory.createPlane(planeDef, w, metadata, pixels); | private RenderHSBWaveTask[] makeRndTasks(PlaneDef planeDef) { ArrayList tasks = new ArrayList(); //Get all objects we need to create the tasks. Plane2D wData; ChannelBinding[] cBindings = renderer.getChannelBindings(); CodomainChain cc = renderer.getCodomainChain(); Pixels metadata = renderer.getMetadata(); PixelBuffer pixels = renderer.getPixels(); QuantumManager qManager = renderer.getQuantumManager(); RenderingStats performanceStats = renderer.getStats(); RGBBuffer channelBuf; //Create a task for each active wavelength. for (int w = 0; w < cBindings.length; w++) { if (cBindings[w].getActive().booleanValue()) { //Allocate the RGB buffer for this wavelength. performanceStats.startMalloc(); channelBuf = new RGBBuffer(sizeX1, sizeX2); performanceStats.endMalloc(); //Get the raw data. performanceStats.startIO(w); wData = Helper.createPlane(planeDef, w, metadata, pixels); performanceStats.endIO(w); //Create a rendering task for this wavelength. tasks.add(new RenderHSBWaveTask(channelBuf, wData, qManager.getStrategyFor(w), cc, cBindings[w].getColor(), sizeX1, sizeX2)); } } //Turn the list into an array an return it. RenderHSBWaveTask[] t = new RenderHSBWaveTask[tasks.size()]; return (RenderHSBWaveTask[]) tasks.toArray(t); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b2d1563defffc9fa654271400d754843f42e2810/HSBStrategy.java/buggy/components/rendering/src/omeis/providers/re/HSBStrategy.java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.