rem
stringlengths 0
477k
| add
stringlengths 0
313k
| context
stringlengths 6
599k
| meta
stringlengths 141
403
|
---|---|---|---|
RubyId id = getRuby().intern(name); | RubyId id = getRuby().intern(name); | public void defineConstant(String name, RubyObject value) { RubyId id = getRuby().intern(name); if (this == getRuby().getClasses().getClassClass()) { getRuby().secure(4); } if (!id.isConstId()) { throw new RubyNameException(getRuby(), "bad constant name " + name); } setConstant(id, value); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
if (this == getRuby().getClasses().getClassClass()) { getRuby().secure(4); } | if (this == getRuby().getClasses().getClassClass()) { getRuby().secure(4); } | public void defineConstant(String name, RubyObject value) { RubyId id = getRuby().intern(name); if (this == getRuby().getClasses().getClassClass()) { getRuby().secure(4); } if (!id.isConstId()) { throw new RubyNameException(getRuby(), "bad constant name " + name); } setConstant(id, value); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
if (!id.isConstId()) { throw new RubyNameException(getRuby(), "bad constant name " + name); } | if (!id.isConstId()) { throw new RubyNameException(getRuby(), "bad constant name " + name); } | public void defineConstant(String name, RubyObject value) { RubyId id = getRuby().intern(name); if (this == getRuby().getClasses().getClassClass()) { getRuby().secure(4); } if (!id.isConstId()) { throw new RubyNameException(getRuby(), "bad constant name " + name); } setConstant(id, value); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
setConstant(id, value); } | setConstant(id, value); } | public void defineConstant(String name, RubyObject value) { RubyId id = getRuby().intern(name); if (this == getRuby().getClasses().getClassClass()) { getRuby().secure(4); } if (!id.isConstId()) { throw new RubyNameException(getRuby(), "bad constant name " + name); } setConstant(id, value); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
RubyId id = getRuby().intern(name); | RubyId id = getRuby().intern(name); | public void defineMethod(String name, RubyCallbackMethod method) { RubyId id = getRuby().intern(name); int noex = (name.charAt(0) == 'i' && id == getRuby().intern("initialize")) ? Constants.NOEX_PRIVATE : Constants.NOEX_PUBLIC; addMethod( id, new NodeFactory(getRuby()).newCFunc(method), noex | Constants.NOEX_CFUNC); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
int noex = (name.charAt(0) == 'i' && id == getRuby().intern("initialize")) ? Constants.NOEX_PRIVATE : Constants.NOEX_PUBLIC; | int noex = (name.charAt(0) == 'i' && id == getRuby().intern("initialize")) ? Constants.NOEX_PRIVATE : Constants.NOEX_PUBLIC; | public void defineMethod(String name, RubyCallbackMethod method) { RubyId id = getRuby().intern(name); int noex = (name.charAt(0) == 'i' && id == getRuby().intern("initialize")) ? Constants.NOEX_PRIVATE : Constants.NOEX_PUBLIC; addMethod( id, new NodeFactory(getRuby()).newCFunc(method), noex | Constants.NOEX_CFUNC); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
addMethod( id, new NodeFactory(getRuby()).newCFunc(method), noex | Constants.NOEX_CFUNC); } | addMethod( id, new NodeFactory(getRuby()).newCFunc(method), noex | Constants.NOEX_CFUNC); } | public void defineMethod(String name, RubyCallbackMethod method) { RubyId id = getRuby().intern(name); int noex = (name.charAt(0) == 'i' && id == getRuby().intern("initialize")) ? Constants.NOEX_PRIVATE : Constants.NOEX_PUBLIC; addMethod( id, new NodeFactory(getRuby()).newCFunc(method), noex | Constants.NOEX_CFUNC); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
addMethod( id, new NodeFactory(getRuby()).newCFunc(method), Constants.NOEX_PUBLIC | Constants.NOEX_CFUNC); } | addMethod( id, new NodeFactory(getRuby()).newCFunc(method), Constants.NOEX_PUBLIC | Constants.NOEX_CFUNC); } | public void defineMethodId(RubyId id, RubyCallbackMethod method) { addMethod( id, new NodeFactory(getRuby()).newCFunc(method), Constants.NOEX_PUBLIC | Constants.NOEX_CFUNC); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
definePrivateMethod(name, method); defineSingletonMethod(name, method); } | definePrivateMethod(name, method); defineSingletonMethod(name, method); } | public void defineModuleFunction(String name, RubyCallbackMethod method) { definePrivateMethod(name, method); defineSingletonMethod(name, method); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
RubyModule newModule = getRuby().defineModuleId(getRuby().intern(name)); | RubyModule newModule = getRuby().defineModuleId(getRuby().intern(name)); | public RubyModule defineModuleUnder(String name) { RubyModule newModule = getRuby().defineModuleId(getRuby().intern(name)); setConstant(getRuby().intern(name), newModule); newModule.setClassPath(this, name); return newModule; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
setConstant(getRuby().intern(name), newModule); newModule.setClassPath(this, name); | setConstant(getRuby().intern(name), newModule); newModule.setClassPath(this, name); | public RubyModule defineModuleUnder(String name) { RubyModule newModule = getRuby().defineModuleId(getRuby().intern(name)); setConstant(getRuby().intern(name), newModule); newModule.setClassPath(this, name); return newModule; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
return newModule; } | return newModule; } | public RubyModule defineModuleUnder(String name) { RubyModule newModule = getRuby().defineModuleId(getRuby().intern(name)); setConstant(getRuby().intern(name), newModule); newModule.setClassPath(this, name); return newModule; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
addMethod( getRuby().intern(name), new NodeFactory(getRuby()).newCFunc(method), Constants.NOEX_PRIVATE | Constants.NOEX_CFUNC); } | addMethod( getRuby().intern(name), new NodeFactory(getRuby()).newCFunc(method), Constants.NOEX_PRIVATE | Constants.NOEX_CFUNC); } | public void definePrivateMethod(String name, RubyCallbackMethod method) { addMethod( getRuby().intern(name), new NodeFactory(getRuby()).newCFunc(method), Constants.NOEX_PRIVATE | Constants.NOEX_CFUNC); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
addMethod( getRuby().intern(name), new NodeFactory(getRuby()).newCFunc(method), Constants.NOEX_PROTECTED | Constants.NOEX_CFUNC); } | addMethod( getRuby().intern(name), new NodeFactory(getRuby()).newCFunc(method), Constants.NOEX_PROTECTED | Constants.NOEX_CFUNC); } | public void defineProtectedMethod(String name, RubyCallbackMethod method) { addMethod( getRuby().intern(name), new NodeFactory(getRuby()).newCFunc(method), Constants.NOEX_PROTECTED | Constants.NOEX_CFUNC); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
if (this == getRuby().getClasses().getObjectClass()) { getRuby().secure(4); } | if (this == getRuby().getClasses().getObjectClass()) { getRuby().secure(4); } | public void exportMethod(RubyId name, int noex) { if (this == getRuby().getClasses().getObjectClass()) { getRuby().secure(4); } MethodNode body = searchMethod(name); RubyModule origin = body.getMethodOrigin(); if (body == null && isModule()) { body = getRuby().getClasses().getObjectClass().searchMethod(name); origin = body.getMethodOrigin(); } if (body == null) { } if (body.getNoex() != noex) { if (this == origin) { body.setNoex(noex); } else { addMethod(name, new NodeFactory(getRuby()).newZSuper(), noex); } } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
MethodNode body = searchMethod(name); RubyModule origin = body.getMethodOrigin(); | MethodNode body = searchMethod(name); RubyModule origin = body.getMethodOrigin(); | public void exportMethod(RubyId name, int noex) { if (this == getRuby().getClasses().getObjectClass()) { getRuby().secure(4); } MethodNode body = searchMethod(name); RubyModule origin = body.getMethodOrigin(); if (body == null && isModule()) { body = getRuby().getClasses().getObjectClass().searchMethod(name); origin = body.getMethodOrigin(); } if (body == null) { } if (body.getNoex() != noex) { if (this == origin) { body.setNoex(noex); } else { addMethod(name, new NodeFactory(getRuby()).newZSuper(), noex); } } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
if (body == null && isModule()) { body = getRuby().getClasses().getObjectClass().searchMethod(name); origin = body.getMethodOrigin(); } | if (body == null && isModule()) { body = getRuby().getClasses().getObjectClass().searchMethod(name); origin = body.getMethodOrigin(); } | public void exportMethod(RubyId name, int noex) { if (this == getRuby().getClasses().getObjectClass()) { getRuby().secure(4); } MethodNode body = searchMethod(name); RubyModule origin = body.getMethodOrigin(); if (body == null && isModule()) { body = getRuby().getClasses().getObjectClass().searchMethod(name); origin = body.getMethodOrigin(); } if (body == null) { } if (body.getNoex() != noex) { if (this == origin) { body.setNoex(noex); } else { addMethod(name, new NodeFactory(getRuby()).newZSuper(), noex); } } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
if (body == null) { } | if (body == null) { } | public void exportMethod(RubyId name, int noex) { if (this == getRuby().getClasses().getObjectClass()) { getRuby().secure(4); } MethodNode body = searchMethod(name); RubyModule origin = body.getMethodOrigin(); if (body == null && isModule()) { body = getRuby().getClasses().getObjectClass().searchMethod(name); origin = body.getMethodOrigin(); } if (body == null) { } if (body.getNoex() != noex) { if (this == origin) { body.setNoex(noex); } else { addMethod(name, new NodeFactory(getRuby()).newZSuper(), noex); } } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
if (body.getNoex() != noex) { if (this == origin) { body.setNoex(noex); } else { addMethod(name, new NodeFactory(getRuby()).newZSuper(), noex); } } } | if (body.getNoex() != noex) { if (this == origin) { body.setNoex(noex); } else { addMethod(name, new NodeFactory(getRuby()).newZSuper(), noex); } } } | public void exportMethod(RubyId name, int noex) { if (this == getRuby().getClasses().getObjectClass()) { getRuby().secure(4); } MethodNode body = searchMethod(name); RubyModule origin = body.getMethodOrigin(); if (body == null && isModule()) { body = getRuby().getClasses().getObjectClass().searchMethod(name); origin = body.getMethodOrigin(); } if (body == null) { } if (body.getNoex() != noex) { if (this == origin) { body.setNoex(noex); } else { addMethod(name, new NodeFactory(getRuby()).newZSuper(), noex); } } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
FindClassPathResult arg = new FindClassPathResult(); arg.klass = this; arg.track = getRuby().getClasses().getObjectClass(); arg.prev = null; | FindClassPathResult arg = new FindClassPathResult(); arg.klass = this; arg.track = getRuby().getClasses().getObjectClass(); arg.prev = null; | public RubyObject findClassPath() { FindClassPathResult arg = new FindClassPathResult(); arg.klass = this; arg.track = getRuby().getClasses().getObjectClass(); arg.prev = null; if (getRuby().getClasses().getObjectClass().getInstanceVariables() != null) { getRuby().getClasses().getObjectClass().getInstanceVariables().foreach( new FindClassPathMapMethod(), arg); } if (arg.name == null) { getRuby().getClasses().getClassMap().foreach(new FindClassPathMapMethod(), arg); } if (arg.name != null) { getInstanceVariables().put(getRuby().intern("__classpath__"), arg.path); return arg.path; } return getRuby().getNil(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
if (getRuby().getClasses().getObjectClass().getInstanceVariables() != null) { getRuby().getClasses().getObjectClass().getInstanceVariables().foreach( new FindClassPathMapMethod(), arg); } | if (getRuby().getClasses().getObjectClass().getInstanceVariables() != null) { getRuby().getClasses().getObjectClass().getInstanceVariables().foreach( new FindClassPathMapMethod(), arg); } | public RubyObject findClassPath() { FindClassPathResult arg = new FindClassPathResult(); arg.klass = this; arg.track = getRuby().getClasses().getObjectClass(); arg.prev = null; if (getRuby().getClasses().getObjectClass().getInstanceVariables() != null) { getRuby().getClasses().getObjectClass().getInstanceVariables().foreach( new FindClassPathMapMethod(), arg); } if (arg.name == null) { getRuby().getClasses().getClassMap().foreach(new FindClassPathMapMethod(), arg); } if (arg.name != null) { getInstanceVariables().put(getRuby().intern("__classpath__"), arg.path); return arg.path; } return getRuby().getNil(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
if (arg.name == null) { getRuby().getClasses().getClassMap().foreach(new FindClassPathMapMethod(), arg); } | if (arg.name == null) { getRuby().getClasses().getClassMap().foreach(new FindClassPathMapMethod(), arg); } | public RubyObject findClassPath() { FindClassPathResult arg = new FindClassPathResult(); arg.klass = this; arg.track = getRuby().getClasses().getObjectClass(); arg.prev = null; if (getRuby().getClasses().getObjectClass().getInstanceVariables() != null) { getRuby().getClasses().getObjectClass().getInstanceVariables().foreach( new FindClassPathMapMethod(), arg); } if (arg.name == null) { getRuby().getClasses().getClassMap().foreach(new FindClassPathMapMethod(), arg); } if (arg.name != null) { getInstanceVariables().put(getRuby().intern("__classpath__"), arg.path); return arg.path; } return getRuby().getNil(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
if (arg.name != null) { getInstanceVariables().put(getRuby().intern("__classpath__"), arg.path); return arg.path; } return getRuby().getNil(); } | if (arg.name != null) { getInstanceVariables().put(getRuby().intern("__classpath__"), arg.path); return arg.path; } return getRuby().getNil(); } | public RubyObject findClassPath() { FindClassPathResult arg = new FindClassPathResult(); arg.klass = this; arg.track = getRuby().getClasses().getObjectClass(); arg.prev = null; if (getRuby().getClasses().getObjectClass().getInstanceVariables() != null) { getRuby().getClasses().getObjectClass().getInstanceVariables().foreach( new FindClassPathMapMethod(), arg); } if (arg.name == null) { getRuby().getClasses().getClassMap().foreach(new FindClassPathMapMethod(), arg); } if (arg.name != null) { getInstanceVariables().put(getRuby().intern("__classpath__"), arg.path); return arg.path; } return getRuby().getNil(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
RubyString path = getClassname(); | RubyString path = getClassname(); | public RubyString getClassPath() { RubyString path = getClassname(); if (path != null) { return path; } String s = "Module"; if (isClass()) { s = "Class"; } return RubyString.m_newString( getRuby(), "<" + s + " 01x" + Integer.toHexString(hashCode()) + ">"); // 0 = pointer } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
if (path != null) { return path; } | if (path != null) { return path; } | public RubyString getClassPath() { RubyString path = getClassname(); if (path != null) { return path; } String s = "Module"; if (isClass()) { s = "Class"; } return RubyString.m_newString( getRuby(), "<" + s + " 01x" + Integer.toHexString(hashCode()) + ">"); // 0 = pointer } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
String s = "Module"; if (isClass()) { s = "Class"; } | String s = "Module"; if (isClass()) { s = "Class"; } | public RubyString getClassPath() { RubyString path = getClassname(); if (path != null) { return path; } String s = "Module"; if (isClass()) { s = "Class"; } return RubyString.m_newString( getRuby(), "<" + s + " 01x" + Integer.toHexString(hashCode()) + ">"); // 0 = pointer } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
return RubyString.m_newString( getRuby(), "<" + s + " 01x" + Integer.toHexString(hashCode()) + ">"); } | return RubyString.m_newString( getRuby(), "<" + s + " 01x" + Integer.toHexString(hashCode()) + ">"); } | public RubyString getClassPath() { RubyString path = getClassname(); if (path != null) { return path; } String s = "Module"; if (isClass()) { s = "Class"; } return RubyString.m_newString( getRuby(), "<" + s + " 01x" + Integer.toHexString(hashCode()) + ">"); // 0 = pointer } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
RubyModule tmp = this; while (tmp != null) { if (tmp.getInstanceVariables() != null && tmp.getInstanceVariables().get(id) != null) { return (RubyObject) tmp.getInstanceVariables().get(id); } tmp = tmp.getSuperClass(); } throw new RubyNameException( getRuby(), "uninitialized class variable " + id.toName() + " in " + toName()); } | RubyModule tmp = this; while (tmp != null) { if (tmp.getInstanceVariables() != null && tmp.getInstanceVariables().get(id) != null) { return (RubyObject) tmp.getInstanceVariables().get(id); } tmp = tmp.getSuperClass(); } throw new RubyNameException( getRuby(), "uninitialized class variable " + id.toName() + " in " + toName()); } | public RubyObject getClassVar(RubyId id) { RubyModule tmp = this; while (tmp != null) { if (tmp.getInstanceVariables() != null && tmp.getInstanceVariables().get(id) != null) { return (RubyObject) tmp.getInstanceVariables().get(id); } tmp = tmp.getSuperClass(); } throw new RubyNameException( getRuby(), "uninitialized class variable " + id.toName() + " in " + toName()); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
return this; } | return this; } | public RubyModule getClassVarSingleton() { return this; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
RubyString path = null; | RubyString path = null; | public RubyString getClassname() { RubyString path = null; RubyModule rbModule = this; while (rbModule.isIncluded() || rbModule.isSingleton()) { rbModule = ((RubyClass) rbModule).getSuperClass(); } if (rbModule == null) { rbModule = getRuby().getClasses().getObjectClass(); } path = (RubyString) getInstanceVariables().get(getRuby().intern("__classpath__")); if (path == null) { if (getInstanceVariables().get(getRuby().intern("__classid__")) != null) { path = RubyString.m_newString( getRuby(), ((RubyId) getInstanceVariables().get(getRuby().intern("__classid__"))) .toName()); // todo: convert from symbol to string getInstanceVariables().put(getRuby().intern("__classpath__"), path); getInstanceVariables().remove(getRuby().intern("__classid__")); } } if (path == null) { RubyObject tmp = rbModule.findClassPath(); if (tmp.isNil()) { return null; } return (RubyString) tmp; } /*if (!(path instanceof RubyString)) { throw new RubyBugException("class path is not set properly"); }*/ return path; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
RubyModule rbModule = this; while (rbModule.isIncluded() || rbModule.isSingleton()) { rbModule = ((RubyClass) rbModule).getSuperClass(); } | RubyModule rbModule = this; while (rbModule.isIncluded() || rbModule.isSingleton()) { rbModule = ((RubyClass) rbModule).getSuperClass(); } | public RubyString getClassname() { RubyString path = null; RubyModule rbModule = this; while (rbModule.isIncluded() || rbModule.isSingleton()) { rbModule = ((RubyClass) rbModule).getSuperClass(); } if (rbModule == null) { rbModule = getRuby().getClasses().getObjectClass(); } path = (RubyString) getInstanceVariables().get(getRuby().intern("__classpath__")); if (path == null) { if (getInstanceVariables().get(getRuby().intern("__classid__")) != null) { path = RubyString.m_newString( getRuby(), ((RubyId) getInstanceVariables().get(getRuby().intern("__classid__"))) .toName()); // todo: convert from symbol to string getInstanceVariables().put(getRuby().intern("__classpath__"), path); getInstanceVariables().remove(getRuby().intern("__classid__")); } } if (path == null) { RubyObject tmp = rbModule.findClassPath(); if (tmp.isNil()) { return null; } return (RubyString) tmp; } /*if (!(path instanceof RubyString)) { throw new RubyBugException("class path is not set properly"); }*/ return path; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
if (rbModule == null) { rbModule = getRuby().getClasses().getObjectClass(); } | if (rbModule == null) { rbModule = getRuby().getClasses().getObjectClass(); } | public RubyString getClassname() { RubyString path = null; RubyModule rbModule = this; while (rbModule.isIncluded() || rbModule.isSingleton()) { rbModule = ((RubyClass) rbModule).getSuperClass(); } if (rbModule == null) { rbModule = getRuby().getClasses().getObjectClass(); } path = (RubyString) getInstanceVariables().get(getRuby().intern("__classpath__")); if (path == null) { if (getInstanceVariables().get(getRuby().intern("__classid__")) != null) { path = RubyString.m_newString( getRuby(), ((RubyId) getInstanceVariables().get(getRuby().intern("__classid__"))) .toName()); // todo: convert from symbol to string getInstanceVariables().put(getRuby().intern("__classpath__"), path); getInstanceVariables().remove(getRuby().intern("__classid__")); } } if (path == null) { RubyObject tmp = rbModule.findClassPath(); if (tmp.isNil()) { return null; } return (RubyString) tmp; } /*if (!(path instanceof RubyString)) { throw new RubyBugException("class path is not set properly"); }*/ return path; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
path = (RubyString) getInstanceVariables().get(getRuby().intern("__classpath__")); if (path == null) { if (getInstanceVariables().get(getRuby().intern("__classid__")) != null) { path = RubyString.m_newString( getRuby(), ((RubyId) getInstanceVariables().get(getRuby().intern("__classid__"))) .toName()); | path = (RubyString) getInstanceVariables().get(getRuby().intern("__classpath__")); if (path == null) { if (getInstanceVariables().get(getRuby().intern("__classid__")) != null) { path = RubyString.m_newString( getRuby(), ((RubyId) getInstanceVariables().get(getRuby().intern("__classid__"))) .toName()); | public RubyString getClassname() { RubyString path = null; RubyModule rbModule = this; while (rbModule.isIncluded() || rbModule.isSingleton()) { rbModule = ((RubyClass) rbModule).getSuperClass(); } if (rbModule == null) { rbModule = getRuby().getClasses().getObjectClass(); } path = (RubyString) getInstanceVariables().get(getRuby().intern("__classpath__")); if (path == null) { if (getInstanceVariables().get(getRuby().intern("__classid__")) != null) { path = RubyString.m_newString( getRuby(), ((RubyId) getInstanceVariables().get(getRuby().intern("__classid__"))) .toName()); // todo: convert from symbol to string getInstanceVariables().put(getRuby().intern("__classpath__"), path); getInstanceVariables().remove(getRuby().intern("__classid__")); } } if (path == null) { RubyObject tmp = rbModule.findClassPath(); if (tmp.isNil()) { return null; } return (RubyString) tmp; } /*if (!(path instanceof RubyString)) { throw new RubyBugException("class path is not set properly"); }*/ return path; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
getInstanceVariables().put(getRuby().intern("__classpath__"), path); getInstanceVariables().remove(getRuby().intern("__classid__")); } } | getInstanceVariables().put(getRuby().intern("__classpath__"), path); getInstanceVariables().remove(getRuby().intern("__classid__")); } } | public RubyString getClassname() { RubyString path = null; RubyModule rbModule = this; while (rbModule.isIncluded() || rbModule.isSingleton()) { rbModule = ((RubyClass) rbModule).getSuperClass(); } if (rbModule == null) { rbModule = getRuby().getClasses().getObjectClass(); } path = (RubyString) getInstanceVariables().get(getRuby().intern("__classpath__")); if (path == null) { if (getInstanceVariables().get(getRuby().intern("__classid__")) != null) { path = RubyString.m_newString( getRuby(), ((RubyId) getInstanceVariables().get(getRuby().intern("__classid__"))) .toName()); // todo: convert from symbol to string getInstanceVariables().put(getRuby().intern("__classpath__"), path); getInstanceVariables().remove(getRuby().intern("__classid__")); } } if (path == null) { RubyObject tmp = rbModule.findClassPath(); if (tmp.isNil()) { return null; } return (RubyString) tmp; } /*if (!(path instanceof RubyString)) { throw new RubyBugException("class path is not set properly"); }*/ return path; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
if (path == null) { RubyObject tmp = rbModule.findClassPath(); | if (path == null) { RubyObject tmp = rbModule.findClassPath(); | public RubyString getClassname() { RubyString path = null; RubyModule rbModule = this; while (rbModule.isIncluded() || rbModule.isSingleton()) { rbModule = ((RubyClass) rbModule).getSuperClass(); } if (rbModule == null) { rbModule = getRuby().getClasses().getObjectClass(); } path = (RubyString) getInstanceVariables().get(getRuby().intern("__classpath__")); if (path == null) { if (getInstanceVariables().get(getRuby().intern("__classid__")) != null) { path = RubyString.m_newString( getRuby(), ((RubyId) getInstanceVariables().get(getRuby().intern("__classid__"))) .toName()); // todo: convert from symbol to string getInstanceVariables().put(getRuby().intern("__classpath__"), path); getInstanceVariables().remove(getRuby().intern("__classid__")); } } if (path == null) { RubyObject tmp = rbModule.findClassPath(); if (tmp.isNil()) { return null; } return (RubyString) tmp; } /*if (!(path instanceof RubyString)) { throw new RubyBugException("class path is not set properly"); }*/ return path; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
if (tmp.isNil()) { return null; } | if (tmp.isNil()) { return null; } | public RubyString getClassname() { RubyString path = null; RubyModule rbModule = this; while (rbModule.isIncluded() || rbModule.isSingleton()) { rbModule = ((RubyClass) rbModule).getSuperClass(); } if (rbModule == null) { rbModule = getRuby().getClasses().getObjectClass(); } path = (RubyString) getInstanceVariables().get(getRuby().intern("__classpath__")); if (path == null) { if (getInstanceVariables().get(getRuby().intern("__classid__")) != null) { path = RubyString.m_newString( getRuby(), ((RubyId) getInstanceVariables().get(getRuby().intern("__classid__"))) .toName()); // todo: convert from symbol to string getInstanceVariables().put(getRuby().intern("__classpath__"), path); getInstanceVariables().remove(getRuby().intern("__classid__")); } } if (path == null) { RubyObject tmp = rbModule.findClassPath(); if (tmp.isNil()) { return null; } return (RubyString) tmp; } /*if (!(path instanceof RubyString)) { throw new RubyBugException("class path is not set properly"); }*/ return path; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
return (RubyString) tmp; } | return (RubyString) tmp; } | public RubyString getClassname() { RubyString path = null; RubyModule rbModule = this; while (rbModule.isIncluded() || rbModule.isSingleton()) { rbModule = ((RubyClass) rbModule).getSuperClass(); } if (rbModule == null) { rbModule = getRuby().getClasses().getObjectClass(); } path = (RubyString) getInstanceVariables().get(getRuby().intern("__classpath__")); if (path == null) { if (getInstanceVariables().get(getRuby().intern("__classid__")) != null) { path = RubyString.m_newString( getRuby(), ((RubyId) getInstanceVariables().get(getRuby().intern("__classid__"))) .toName()); // todo: convert from symbol to string getInstanceVariables().put(getRuby().intern("__classpath__"), path); getInstanceVariables().remove(getRuby().intern("__classid__")); } } if (path == null) { RubyObject tmp = rbModule.findClassPath(); if (tmp.isNil()) { return null; } return (RubyString) tmp; } /*if (!(path instanceof RubyString)) { throw new RubyBugException("class path is not set properly"); }*/ return path; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
/*if (!(path instanceof RubyString)) { throw new RubyBugException("class path is not set properly"); }*/ | /*if (!(path instanceof RubyString)) { throw new RubyBugException("class path is not set properly"); }*/ | public RubyString getClassname() { RubyString path = null; RubyModule rbModule = this; while (rbModule.isIncluded() || rbModule.isSingleton()) { rbModule = ((RubyClass) rbModule).getSuperClass(); } if (rbModule == null) { rbModule = getRuby().getClasses().getObjectClass(); } path = (RubyString) getInstanceVariables().get(getRuby().intern("__classpath__")); if (path == null) { if (getInstanceVariables().get(getRuby().intern("__classid__")) != null) { path = RubyString.m_newString( getRuby(), ((RubyId) getInstanceVariables().get(getRuby().intern("__classid__"))) .toName()); // todo: convert from symbol to string getInstanceVariables().put(getRuby().intern("__classpath__"), path); getInstanceVariables().remove(getRuby().intern("__classid__")); } } if (path == null) { RubyObject tmp = rbModule.findClassPath(); if (tmp.isNil()) { return null; } return (RubyString) tmp; } /*if (!(path instanceof RubyString)) { throw new RubyBugException("class path is not set properly"); }*/ return path; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
return path; } | return path; } | public RubyString getClassname() { RubyString path = null; RubyModule rbModule = this; while (rbModule.isIncluded() || rbModule.isSingleton()) { rbModule = ((RubyClass) rbModule).getSuperClass(); } if (rbModule == null) { rbModule = getRuby().getClasses().getObjectClass(); } path = (RubyString) getInstanceVariables().get(getRuby().intern("__classpath__")); if (path == null) { if (getInstanceVariables().get(getRuby().intern("__classid__")) != null) { path = RubyString.m_newString( getRuby(), ((RubyId) getInstanceVariables().get(getRuby().intern("__classid__"))) .toName()); // todo: convert from symbol to string getInstanceVariables().put(getRuby().intern("__classpath__"), path); getInstanceVariables().remove(getRuby().intern("__classid__")); } } if (path == null) { RubyObject tmp = rbModule.findClassPath(); if (tmp.isNil()) { return null; } return (RubyString) tmp; } /*if (!(path instanceof RubyString)) { throw new RubyBugException("class path is not set properly"); }*/ return path; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
RubyMapMethod sv_i = new RubyMapMethod() { public int execute(Object key, Object value, Object arg) { if (((RubyId) key).isConstId()) { RubyString name = RubyString.m_newString(getRuby(), ((RubyId) key).toName()); if (((RubyArray) arg).m_includes(name).isFalse()) { ((RubyArray) arg).m_push(name); } } return RubyMapMethod.CONTINUE; } }; | RubyMapMethod sv_i = new RubyMapMethod() { public int execute(Object key, Object value, Object arg) { if (((RubyId) key).isConstId()) { RubyString name = RubyString.m_newString(getRuby(), ((RubyId) key).toName()); if (((RubyArray) arg).m_includes(name).isFalse()) { ((RubyArray) arg).m_push(name); } } return RubyMapMethod.CONTINUE; } }; | public RubyArray getConstAt(RubyArray ary) { RubyMapMethod sv_i = new RubyMapMethod() { public int execute(Object key, Object value, Object arg) { if (((RubyId) key).isConstId()) { RubyString name = RubyString.m_newString(getRuby(), ((RubyId) key).toName()); if (((RubyArray) arg).m_includes(name).isFalse()) { ((RubyArray) arg).m_push(name); } } return RubyMapMethod.CONTINUE; } }; if (getInstanceVariables() != null) { getInstanceVariables().foreach(sv_i, ary); } if (this == getRuby().getClasses().getObjectClass()) { getRuby().getClasses().getClassMap().foreach(sv_i, ary); /*if (autoload_tbl) { st_foreach(autoload_tbl, autoload_i, ary); }*/ } return ary; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
if (getInstanceVariables() != null) { getInstanceVariables().foreach(sv_i, ary); } if (this == getRuby().getClasses().getObjectClass()) { getRuby().getClasses().getClassMap().foreach(sv_i, ary); /*if (autoload_tbl) { st_foreach(autoload_tbl, autoload_i, ary); }*/ } return ary; } | if (getInstanceVariables() != null) { getInstanceVariables().foreach(sv_i, ary); } if (this == getRuby().getClasses().getObjectClass()) { getRuby().getClasses().getClassMap().foreach(sv_i, ary); /*if (autoload_tbl) { st_foreach(autoload_tbl, autoload_i, ary); }*/ } return ary; } | public RubyArray getConstAt(RubyArray ary) { RubyMapMethod sv_i = new RubyMapMethod() { public int execute(Object key, Object value, Object arg) { if (((RubyId) key).isConstId()) { RubyString name = RubyString.m_newString(getRuby(), ((RubyId) key).toName()); if (((RubyArray) arg).m_includes(name).isFalse()) { ((RubyArray) arg).m_push(name); } } return RubyMapMethod.CONTINUE; } }; if (getInstanceVariables() != null) { getInstanceVariables().foreach(sv_i, ary); } if (this == getRuby().getClasses().getObjectClass()) { getRuby().getClasses().getClassMap().foreach(sv_i, ary); /*if (autoload_tbl) { st_foreach(autoload_tbl, autoload_i, ary); }*/ } return ary; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
if (((RubyId) key).isConstId()) { RubyString name = RubyString.m_newString(getRuby(), ((RubyId) key).toName()); if (((RubyArray) arg).m_includes(name).isFalse()) { ((RubyArray) arg).m_push(name); } } return RubyMapMethod.CONTINUE; } | if (((RubyId) key).isConstId()) { RubyString name = RubyString.m_newString(getRuby(), ((RubyId) key).toName()); if (((RubyArray) arg).m_includes(name).isFalse()) { ((RubyArray) arg).m_push(name); } } return RubyMapMethod.CONTINUE; } | public int execute(Object key, Object value, Object arg) { if (((RubyId) key).isConstId()) { RubyString name = RubyString.m_newString(getRuby(), ((RubyId) key).toName()); if (((RubyArray) arg).m_includes(name).isFalse()) { ((RubyArray) arg).m_push(name); } } return RubyMapMethod.CONTINUE; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
RubyModule klass = this; while (klass != null) { getConstAt(ary); klass = klass.getSuperClass(); } return ary; } | RubyModule klass = this; while (klass != null) { getConstAt(ary); klass = klass.getSuperClass(); } return ary; } | public RubyArray getConstOf(RubyArray ary) { RubyModule klass = this; while (klass != null) { getConstAt(ary); klass = klass.getSuperClass(); } return ary; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
boolean mod_retry = false; RubyModule tmp = this; | boolean mod_retry = false; RubyModule tmp = this; | public RubyObject getConstant(RubyId id) { boolean mod_retry = false; RubyModule tmp = this; while (true) { while (tmp != null) { if (tmp.getInstanceVariables().get(id) != null) { return (RubyObject) tmp.getInstanceVariables().get(id); } if (tmp == getRuby().getClasses().getObjectClass() && getRuby().getTopConstant(id) != null) { return getRuby().getTopConstant(id); } tmp = tmp.getSuperClass(); } if (!mod_retry && isModule()) { mod_retry = true; tmp = getRuby().getClasses().getObjectClass(); continue; } break; } /* Uninitialized constant */ if (this != getRuby().getClasses().getObjectClass()) { throw new RubyNameException( getRuby(), "uninitialized constant " + id.toName() + " at " + getClassPath().getValue()); } else { throw new RubyNameException(getRuby(), "uninitialized constant " + id.toName()); } // return getRuby().getNil(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
while (true) { while (tmp != null) { if (tmp.getInstanceVariables().get(id) != null) { return (RubyObject) tmp.getInstanceVariables().get(id); } if (tmp == getRuby().getClasses().getObjectClass() && getRuby().getTopConstant(id) != null) { return getRuby().getTopConstant(id); } tmp = tmp.getSuperClass(); } if (!mod_retry && isModule()) { mod_retry = true; tmp = getRuby().getClasses().getObjectClass(); continue; } break; } | while (true) { while (tmp != null) { if (tmp.getInstanceVariables().get(id) != null) { return (RubyObject) tmp.getInstanceVariables().get(id); } if (tmp == getRuby().getClasses().getObjectClass() && getRuby().getTopConstant(id) != null) { return getRuby().getTopConstant(id); } tmp = tmp.getSuperClass(); } if (!mod_retry && isModule()) { mod_retry = true; tmp = getRuby().getClasses().getObjectClass(); continue; } break; } | public RubyObject getConstant(RubyId id) { boolean mod_retry = false; RubyModule tmp = this; while (true) { while (tmp != null) { if (tmp.getInstanceVariables().get(id) != null) { return (RubyObject) tmp.getInstanceVariables().get(id); } if (tmp == getRuby().getClasses().getObjectClass() && getRuby().getTopConstant(id) != null) { return getRuby().getTopConstant(id); } tmp = tmp.getSuperClass(); } if (!mod_retry && isModule()) { mod_retry = true; tmp = getRuby().getClasses().getObjectClass(); continue; } break; } /* Uninitialized constant */ if (this != getRuby().getClasses().getObjectClass()) { throw new RubyNameException( getRuby(), "uninitialized constant " + id.toName() + " at " + getClassPath().getValue()); } else { throw new RubyNameException(getRuby(), "uninitialized constant " + id.toName()); } // return getRuby().getNil(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
/* Uninitialized constant */ if (this != getRuby().getClasses().getObjectClass()) { throw new RubyNameException( getRuby(), "uninitialized constant " + id.toName() + " at " + getClassPath().getValue()); } else { throw new RubyNameException(getRuby(), "uninitialized constant " + id.toName()); } | /* Uninitialized constant */ if (this != getRuby().getClasses().getObjectClass()) { throw new RubyNameException( getRuby(), "uninitialized constant " + id.toName() + " at " + getClassPath().getValue()); } else { throw new RubyNameException(getRuby(), "uninitialized constant " + id.toName()); } | public RubyObject getConstant(RubyId id) { boolean mod_retry = false; RubyModule tmp = this; while (true) { while (tmp != null) { if (tmp.getInstanceVariables().get(id) != null) { return (RubyObject) tmp.getInstanceVariables().get(id); } if (tmp == getRuby().getClasses().getObjectClass() && getRuby().getTopConstant(id) != null) { return getRuby().getTopConstant(id); } tmp = tmp.getSuperClass(); } if (!mod_retry && isModule()) { mod_retry = true; tmp = getRuby().getClasses().getObjectClass(); continue; } break; } /* Uninitialized constant */ if (this != getRuby().getClasses().getObjectClass()) { throw new RubyNameException( getRuby(), "uninitialized constant " + id.toName() + " at " + getClassPath().getValue()); } else { throw new RubyNameException(getRuby(), "uninitialized constant " + id.toName()); } // return getRuby().getNil(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
} | } | public RubyObject getConstant(RubyId id) { boolean mod_retry = false; RubyModule tmp = this; while (true) { while (tmp != null) { if (tmp.getInstanceVariables().get(id) != null) { return (RubyObject) tmp.getInstanceVariables().get(id); } if (tmp == getRuby().getClasses().getObjectClass() && getRuby().getTopConstant(id) != null) { return getRuby().getTopConstant(id); } tmp = tmp.getSuperClass(); } if (!mod_retry && isModule()) { mod_retry = true; tmp = getRuby().getClasses().getObjectClass(); continue; } break; } /* Uninitialized constant */ if (this != getRuby().getClasses().getObjectClass()) { throw new RubyNameException( getRuby(), "uninitialized constant " + id.toName() + " at " + getClassPath().getValue()); } else { throw new RubyNameException(getRuby(), "uninitialized constant " + id.toName()); } // return getRuby().getNil(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
GetMethodBodyResult result = new GetMethodBodyResult(this, id, noex); | GetMethodBodyResult result = new GetMethodBodyResult(this, id, noex); | public GetMethodBodyResult getMethodBody(RubyId id, int noex) { GetMethodBodyResult result = new GetMethodBodyResult(this, id, noex); MethodNode methodNode = searchMethod(id); if (methodNode == null || methodNode.getBodyNode() == null) { System.out.println( "Cant find method \"" + id.toName() + "\" in class " + toName()); RubyMethodCacheEntry.saveEmptyEntry(getRuby(), this, id); return result; } RubyMethodCacheEntry ent = new RubyMethodCacheEntry(this, methodNode.getNoex()); Node body = methodNode.getBodyNode(); if (body instanceof FBodyNode) { FBodyNode fbody = (FBodyNode) body; ent.setMid(id); ent.setOrigin((RubyModule) fbody.getOrigin()); ent.setMid0(fbody.getMId()); ent.setMethod(fbody.getHeadNode()); result.setRecvClass((RubyModule) fbody.getOrigin()); result.setId(fbody.getMId()); body = fbody.getHeadNode(); } else { ent.setMid(id); ent.setMid0(id); ent.setOrigin(methodNode.getMethodOrigin()); ent.setMethod(body); result.setRecvClass(methodNode.getMethodOrigin()); } RubyMethodCacheEntry.saveEntry(getRuby(), this, id, ent); result.setNoex(ent.getNoex()); result.setBody(body); return result; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
MethodNode methodNode = searchMethod(id); | MethodNode methodNode = searchMethod(id); | public GetMethodBodyResult getMethodBody(RubyId id, int noex) { GetMethodBodyResult result = new GetMethodBodyResult(this, id, noex); MethodNode methodNode = searchMethod(id); if (methodNode == null || methodNode.getBodyNode() == null) { System.out.println( "Cant find method \"" + id.toName() + "\" in class " + toName()); RubyMethodCacheEntry.saveEmptyEntry(getRuby(), this, id); return result; } RubyMethodCacheEntry ent = new RubyMethodCacheEntry(this, methodNode.getNoex()); Node body = methodNode.getBodyNode(); if (body instanceof FBodyNode) { FBodyNode fbody = (FBodyNode) body; ent.setMid(id); ent.setOrigin((RubyModule) fbody.getOrigin()); ent.setMid0(fbody.getMId()); ent.setMethod(fbody.getHeadNode()); result.setRecvClass((RubyModule) fbody.getOrigin()); result.setId(fbody.getMId()); body = fbody.getHeadNode(); } else { ent.setMid(id); ent.setMid0(id); ent.setOrigin(methodNode.getMethodOrigin()); ent.setMethod(body); result.setRecvClass(methodNode.getMethodOrigin()); } RubyMethodCacheEntry.saveEntry(getRuby(), this, id, ent); result.setNoex(ent.getNoex()); result.setBody(body); return result; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
if (methodNode == null || methodNode.getBodyNode() == null) { System.out.println( "Cant find method \"" + id.toName() + "\" in class " + toName()); | if (methodNode == null || methodNode.getBodyNode() == null) { System.out.println( "Cant find method \"" + id.toName() + "\" in class " + toName()); | public GetMethodBodyResult getMethodBody(RubyId id, int noex) { GetMethodBodyResult result = new GetMethodBodyResult(this, id, noex); MethodNode methodNode = searchMethod(id); if (methodNode == null || methodNode.getBodyNode() == null) { System.out.println( "Cant find method \"" + id.toName() + "\" in class " + toName()); RubyMethodCacheEntry.saveEmptyEntry(getRuby(), this, id); return result; } RubyMethodCacheEntry ent = new RubyMethodCacheEntry(this, methodNode.getNoex()); Node body = methodNode.getBodyNode(); if (body instanceof FBodyNode) { FBodyNode fbody = (FBodyNode) body; ent.setMid(id); ent.setOrigin((RubyModule) fbody.getOrigin()); ent.setMid0(fbody.getMId()); ent.setMethod(fbody.getHeadNode()); result.setRecvClass((RubyModule) fbody.getOrigin()); result.setId(fbody.getMId()); body = fbody.getHeadNode(); } else { ent.setMid(id); ent.setMid0(id); ent.setOrigin(methodNode.getMethodOrigin()); ent.setMethod(body); result.setRecvClass(methodNode.getMethodOrigin()); } RubyMethodCacheEntry.saveEntry(getRuby(), this, id, ent); result.setNoex(ent.getNoex()); result.setBody(body); return result; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
RubyMethodCacheEntry.saveEmptyEntry(getRuby(), this, id); | RubyMethodCacheEntry.saveEmptyEntry(getRuby(), this, id); | public GetMethodBodyResult getMethodBody(RubyId id, int noex) { GetMethodBodyResult result = new GetMethodBodyResult(this, id, noex); MethodNode methodNode = searchMethod(id); if (methodNode == null || methodNode.getBodyNode() == null) { System.out.println( "Cant find method \"" + id.toName() + "\" in class " + toName()); RubyMethodCacheEntry.saveEmptyEntry(getRuby(), this, id); return result; } RubyMethodCacheEntry ent = new RubyMethodCacheEntry(this, methodNode.getNoex()); Node body = methodNode.getBodyNode(); if (body instanceof FBodyNode) { FBodyNode fbody = (FBodyNode) body; ent.setMid(id); ent.setOrigin((RubyModule) fbody.getOrigin()); ent.setMid0(fbody.getMId()); ent.setMethod(fbody.getHeadNode()); result.setRecvClass((RubyModule) fbody.getOrigin()); result.setId(fbody.getMId()); body = fbody.getHeadNode(); } else { ent.setMid(id); ent.setMid0(id); ent.setOrigin(methodNode.getMethodOrigin()); ent.setMethod(body); result.setRecvClass(methodNode.getMethodOrigin()); } RubyMethodCacheEntry.saveEntry(getRuby(), this, id, ent); result.setNoex(ent.getNoex()); result.setBody(body); return result; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
return result; } | return result; } | public GetMethodBodyResult getMethodBody(RubyId id, int noex) { GetMethodBodyResult result = new GetMethodBodyResult(this, id, noex); MethodNode methodNode = searchMethod(id); if (methodNode == null || methodNode.getBodyNode() == null) { System.out.println( "Cant find method \"" + id.toName() + "\" in class " + toName()); RubyMethodCacheEntry.saveEmptyEntry(getRuby(), this, id); return result; } RubyMethodCacheEntry ent = new RubyMethodCacheEntry(this, methodNode.getNoex()); Node body = methodNode.getBodyNode(); if (body instanceof FBodyNode) { FBodyNode fbody = (FBodyNode) body; ent.setMid(id); ent.setOrigin((RubyModule) fbody.getOrigin()); ent.setMid0(fbody.getMId()); ent.setMethod(fbody.getHeadNode()); result.setRecvClass((RubyModule) fbody.getOrigin()); result.setId(fbody.getMId()); body = fbody.getHeadNode(); } else { ent.setMid(id); ent.setMid0(id); ent.setOrigin(methodNode.getMethodOrigin()); ent.setMethod(body); result.setRecvClass(methodNode.getMethodOrigin()); } RubyMethodCacheEntry.saveEntry(getRuby(), this, id, ent); result.setNoex(ent.getNoex()); result.setBody(body); return result; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
RubyMethodCacheEntry ent = new RubyMethodCacheEntry(this, methodNode.getNoex()); | RubyMethodCacheEntry ent = new RubyMethodCacheEntry(this, methodNode.getNoex()); | public GetMethodBodyResult getMethodBody(RubyId id, int noex) { GetMethodBodyResult result = new GetMethodBodyResult(this, id, noex); MethodNode methodNode = searchMethod(id); if (methodNode == null || methodNode.getBodyNode() == null) { System.out.println( "Cant find method \"" + id.toName() + "\" in class " + toName()); RubyMethodCacheEntry.saveEmptyEntry(getRuby(), this, id); return result; } RubyMethodCacheEntry ent = new RubyMethodCacheEntry(this, methodNode.getNoex()); Node body = methodNode.getBodyNode(); if (body instanceof FBodyNode) { FBodyNode fbody = (FBodyNode) body; ent.setMid(id); ent.setOrigin((RubyModule) fbody.getOrigin()); ent.setMid0(fbody.getMId()); ent.setMethod(fbody.getHeadNode()); result.setRecvClass((RubyModule) fbody.getOrigin()); result.setId(fbody.getMId()); body = fbody.getHeadNode(); } else { ent.setMid(id); ent.setMid0(id); ent.setOrigin(methodNode.getMethodOrigin()); ent.setMethod(body); result.setRecvClass(methodNode.getMethodOrigin()); } RubyMethodCacheEntry.saveEntry(getRuby(), this, id, ent); result.setNoex(ent.getNoex()); result.setBody(body); return result; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
Node body = methodNode.getBodyNode(); | Node body = methodNode.getBodyNode(); | public GetMethodBodyResult getMethodBody(RubyId id, int noex) { GetMethodBodyResult result = new GetMethodBodyResult(this, id, noex); MethodNode methodNode = searchMethod(id); if (methodNode == null || methodNode.getBodyNode() == null) { System.out.println( "Cant find method \"" + id.toName() + "\" in class " + toName()); RubyMethodCacheEntry.saveEmptyEntry(getRuby(), this, id); return result; } RubyMethodCacheEntry ent = new RubyMethodCacheEntry(this, methodNode.getNoex()); Node body = methodNode.getBodyNode(); if (body instanceof FBodyNode) { FBodyNode fbody = (FBodyNode) body; ent.setMid(id); ent.setOrigin((RubyModule) fbody.getOrigin()); ent.setMid0(fbody.getMId()); ent.setMethod(fbody.getHeadNode()); result.setRecvClass((RubyModule) fbody.getOrigin()); result.setId(fbody.getMId()); body = fbody.getHeadNode(); } else { ent.setMid(id); ent.setMid0(id); ent.setOrigin(methodNode.getMethodOrigin()); ent.setMethod(body); result.setRecvClass(methodNode.getMethodOrigin()); } RubyMethodCacheEntry.saveEntry(getRuby(), this, id, ent); result.setNoex(ent.getNoex()); result.setBody(body); return result; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
if (body instanceof FBodyNode) { FBodyNode fbody = (FBodyNode) body; | if (body instanceof FBodyNode) { FBodyNode fbody = (FBodyNode) body; | public GetMethodBodyResult getMethodBody(RubyId id, int noex) { GetMethodBodyResult result = new GetMethodBodyResult(this, id, noex); MethodNode methodNode = searchMethod(id); if (methodNode == null || methodNode.getBodyNode() == null) { System.out.println( "Cant find method \"" + id.toName() + "\" in class " + toName()); RubyMethodCacheEntry.saveEmptyEntry(getRuby(), this, id); return result; } RubyMethodCacheEntry ent = new RubyMethodCacheEntry(this, methodNode.getNoex()); Node body = methodNode.getBodyNode(); if (body instanceof FBodyNode) { FBodyNode fbody = (FBodyNode) body; ent.setMid(id); ent.setOrigin((RubyModule) fbody.getOrigin()); ent.setMid0(fbody.getMId()); ent.setMethod(fbody.getHeadNode()); result.setRecvClass((RubyModule) fbody.getOrigin()); result.setId(fbody.getMId()); body = fbody.getHeadNode(); } else { ent.setMid(id); ent.setMid0(id); ent.setOrigin(methodNode.getMethodOrigin()); ent.setMethod(body); result.setRecvClass(methodNode.getMethodOrigin()); } RubyMethodCacheEntry.saveEntry(getRuby(), this, id, ent); result.setNoex(ent.getNoex()); result.setBody(body); return result; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
ent.setMid(id); ent.setOrigin((RubyModule) fbody.getOrigin()); ent.setMid0(fbody.getMId()); ent.setMethod(fbody.getHeadNode()); | ent.setMid(id); ent.setOrigin((RubyModule) fbody.getOrigin()); ent.setMid0(fbody.getMId()); ent.setMethod(fbody.getHeadNode()); | public GetMethodBodyResult getMethodBody(RubyId id, int noex) { GetMethodBodyResult result = new GetMethodBodyResult(this, id, noex); MethodNode methodNode = searchMethod(id); if (methodNode == null || methodNode.getBodyNode() == null) { System.out.println( "Cant find method \"" + id.toName() + "\" in class " + toName()); RubyMethodCacheEntry.saveEmptyEntry(getRuby(), this, id); return result; } RubyMethodCacheEntry ent = new RubyMethodCacheEntry(this, methodNode.getNoex()); Node body = methodNode.getBodyNode(); if (body instanceof FBodyNode) { FBodyNode fbody = (FBodyNode) body; ent.setMid(id); ent.setOrigin((RubyModule) fbody.getOrigin()); ent.setMid0(fbody.getMId()); ent.setMethod(fbody.getHeadNode()); result.setRecvClass((RubyModule) fbody.getOrigin()); result.setId(fbody.getMId()); body = fbody.getHeadNode(); } else { ent.setMid(id); ent.setMid0(id); ent.setOrigin(methodNode.getMethodOrigin()); ent.setMethod(body); result.setRecvClass(methodNode.getMethodOrigin()); } RubyMethodCacheEntry.saveEntry(getRuby(), this, id, ent); result.setNoex(ent.getNoex()); result.setBody(body); return result; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
result.setRecvClass((RubyModule) fbody.getOrigin()); result.setId(fbody.getMId()); body = fbody.getHeadNode(); } else { ent.setMid(id); ent.setMid0(id); ent.setOrigin(methodNode.getMethodOrigin()); ent.setMethod(body); | result.setRecvClass((RubyModule) fbody.getOrigin()); result.setId(fbody.getMId()); body = fbody.getHeadNode(); } else { ent.setMid(id); ent.setMid0(id); ent.setOrigin(methodNode.getMethodOrigin()); ent.setMethod(body); | public GetMethodBodyResult getMethodBody(RubyId id, int noex) { GetMethodBodyResult result = new GetMethodBodyResult(this, id, noex); MethodNode methodNode = searchMethod(id); if (methodNode == null || methodNode.getBodyNode() == null) { System.out.println( "Cant find method \"" + id.toName() + "\" in class " + toName()); RubyMethodCacheEntry.saveEmptyEntry(getRuby(), this, id); return result; } RubyMethodCacheEntry ent = new RubyMethodCacheEntry(this, methodNode.getNoex()); Node body = methodNode.getBodyNode(); if (body instanceof FBodyNode) { FBodyNode fbody = (FBodyNode) body; ent.setMid(id); ent.setOrigin((RubyModule) fbody.getOrigin()); ent.setMid0(fbody.getMId()); ent.setMethod(fbody.getHeadNode()); result.setRecvClass((RubyModule) fbody.getOrigin()); result.setId(fbody.getMId()); body = fbody.getHeadNode(); } else { ent.setMid(id); ent.setMid0(id); ent.setOrigin(methodNode.getMethodOrigin()); ent.setMethod(body); result.setRecvClass(methodNode.getMethodOrigin()); } RubyMethodCacheEntry.saveEntry(getRuby(), this, id, ent); result.setNoex(ent.getNoex()); result.setBody(body); return result; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
result.setRecvClass(methodNode.getMethodOrigin()); } | result.setRecvClass(methodNode.getMethodOrigin()); } | public GetMethodBodyResult getMethodBody(RubyId id, int noex) { GetMethodBodyResult result = new GetMethodBodyResult(this, id, noex); MethodNode methodNode = searchMethod(id); if (methodNode == null || methodNode.getBodyNode() == null) { System.out.println( "Cant find method \"" + id.toName() + "\" in class " + toName()); RubyMethodCacheEntry.saveEmptyEntry(getRuby(), this, id); return result; } RubyMethodCacheEntry ent = new RubyMethodCacheEntry(this, methodNode.getNoex()); Node body = methodNode.getBodyNode(); if (body instanceof FBodyNode) { FBodyNode fbody = (FBodyNode) body; ent.setMid(id); ent.setOrigin((RubyModule) fbody.getOrigin()); ent.setMid0(fbody.getMId()); ent.setMethod(fbody.getHeadNode()); result.setRecvClass((RubyModule) fbody.getOrigin()); result.setId(fbody.getMId()); body = fbody.getHeadNode(); } else { ent.setMid(id); ent.setMid0(id); ent.setOrigin(methodNode.getMethodOrigin()); ent.setMethod(body); result.setRecvClass(methodNode.getMethodOrigin()); } RubyMethodCacheEntry.saveEntry(getRuby(), this, id, ent); result.setNoex(ent.getNoex()); result.setBody(body); return result; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
RubyMethodCacheEntry.saveEntry(getRuby(), this, id, ent); | RubyMethodCacheEntry.saveEntry(getRuby(), this, id, ent); | public GetMethodBodyResult getMethodBody(RubyId id, int noex) { GetMethodBodyResult result = new GetMethodBodyResult(this, id, noex); MethodNode methodNode = searchMethod(id); if (methodNode == null || methodNode.getBodyNode() == null) { System.out.println( "Cant find method \"" + id.toName() + "\" in class " + toName()); RubyMethodCacheEntry.saveEmptyEntry(getRuby(), this, id); return result; } RubyMethodCacheEntry ent = new RubyMethodCacheEntry(this, methodNode.getNoex()); Node body = methodNode.getBodyNode(); if (body instanceof FBodyNode) { FBodyNode fbody = (FBodyNode) body; ent.setMid(id); ent.setOrigin((RubyModule) fbody.getOrigin()); ent.setMid0(fbody.getMId()); ent.setMethod(fbody.getHeadNode()); result.setRecvClass((RubyModule) fbody.getOrigin()); result.setId(fbody.getMId()); body = fbody.getHeadNode(); } else { ent.setMid(id); ent.setMid0(id); ent.setOrigin(methodNode.getMethodOrigin()); ent.setMethod(body); result.setRecvClass(methodNode.getMethodOrigin()); } RubyMethodCacheEntry.saveEntry(getRuby(), this, id, ent); result.setNoex(ent.getNoex()); result.setBody(body); return result; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
result.setNoex(ent.getNoex()); result.setBody(body); return result; } | result.setNoex(ent.getNoex()); result.setBody(body); return result; } | public GetMethodBodyResult getMethodBody(RubyId id, int noex) { GetMethodBodyResult result = new GetMethodBodyResult(this, id, noex); MethodNode methodNode = searchMethod(id); if (methodNode == null || methodNode.getBodyNode() == null) { System.out.println( "Cant find method \"" + id.toName() + "\" in class " + toName()); RubyMethodCacheEntry.saveEmptyEntry(getRuby(), this, id); return result; } RubyMethodCacheEntry ent = new RubyMethodCacheEntry(this, methodNode.getNoex()); Node body = methodNode.getBodyNode(); if (body instanceof FBodyNode) { FBodyNode fbody = (FBodyNode) body; ent.setMid(id); ent.setOrigin((RubyModule) fbody.getOrigin()); ent.setMid0(fbody.getMId()); ent.setMethod(fbody.getHeadNode()); result.setRecvClass((RubyModule) fbody.getOrigin()); result.setId(fbody.getMId()); body = fbody.getHeadNode(); } else { ent.setMid(id); ent.setMid0(id); ent.setOrigin(methodNode.getMethodOrigin()); ent.setMethod(body); result.setRecvClass(methodNode.getMethodOrigin()); } RubyMethodCacheEntry.saveEntry(getRuby(), this, id, ent); result.setNoex(ent.getNoex()); result.setBody(body); return result; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
return this.methods; } | return this.methods; } | public RubyMap getMethods() { return this.methods; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
if (!isSingleton()) { return this; } | if (!isSingleton()) { return this; } | public RubyModule getSingletonClassClone() { if (!isSingleton()) { return this; } RubyModule clone = new RubyClass(getRuby(), getSuperClass()); clone.setupClone(this); clone.setInstanceVariables(getInstanceVariables().cloneRubyMap()); //clone.setMethods(); // st_foreach(RCLASS(klass)->m_tbl, clone_method, clone->m_tbl); clone.setSingleton(true); return clone; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
RubyModule clone = new RubyClass(getRuby(), getSuperClass()); clone.setupClone(this); clone.setInstanceVariables(getInstanceVariables().cloneRubyMap()); | RubyModule clone = new RubyClass(getRuby(), getSuperClass()); clone.setupClone(this); clone.setInstanceVariables(getInstanceVariables().cloneRubyMap()); | public RubyModule getSingletonClassClone() { if (!isSingleton()) { return this; } RubyModule clone = new RubyClass(getRuby(), getSuperClass()); clone.setupClone(this); clone.setInstanceVariables(getInstanceVariables().cloneRubyMap()); //clone.setMethods(); // st_foreach(RCLASS(klass)->m_tbl, clone_method, clone->m_tbl); clone.setSingleton(true); return clone; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
public RubyModule getSingletonClassClone() { if (!isSingleton()) { return this; } RubyModule clone = new RubyClass(getRuby(), getSuperClass()); clone.setupClone(this); clone.setInstanceVariables(getInstanceVariables().cloneRubyMap()); //clone.setMethods(); // st_foreach(RCLASS(klass)->m_tbl, clone_method, clone->m_tbl); clone.setSingleton(true); return clone; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
||
public RubyModule getSingletonClassClone() { if (!isSingleton()) { return this; } RubyModule clone = new RubyClass(getRuby(), getSuperClass()); clone.setupClone(this); clone.setInstanceVariables(getInstanceVariables().cloneRubyMap()); //clone.setMethods(); // st_foreach(RCLASS(klass)->m_tbl, clone_method, clone->m_tbl); clone.setSingleton(true); return clone; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
||
clone.setSingleton(true); | clone.setSingleton(true); | public RubyModule getSingletonClassClone() { if (!isSingleton()) { return this; } RubyModule clone = new RubyClass(getRuby(), getSuperClass()); clone.setupClone(this); clone.setInstanceVariables(getInstanceVariables().cloneRubyMap()); //clone.setMethods(); // st_foreach(RCLASS(klass)->m_tbl, clone_method, clone->m_tbl); clone.setSingleton(true); return clone; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
return clone; } | return clone; } | public RubyModule getSingletonClassClone() { if (!isSingleton()) { return this; } RubyModule clone = new RubyClass(getRuby(), getSuperClass()); clone.setupClone(this); clone.setInstanceVariables(getInstanceVariables().cloneRubyMap()); //clone.setMethods(); // st_foreach(RCLASS(klass)->m_tbl, clone_method, clone->m_tbl); clone.setSingleton(true); return clone; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
return this.superClass; } | return this.superClass; } | public RubyModule getSuperClass() { return this.superClass; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
if (rubyModule == null || rubyModule == this) { return; } | if (rubyModule == null || rubyModule == this) { return; } | public void includeModule(RubyModule rubyModule) { if (rubyModule == null || rubyModule == this) { return; } /* Fixed to Ruby 1.6.5 */ for (RubyModule actClass = this; rubyModule != null; rubyModule = rubyModule.getSuperClass()) { for (RubyModule rbClass = actClass.getSuperClass(); rbClass != null; rbClass = rbClass.getSuperClass()) { if (rbClass.isIncluded() && rbClass.methods == rubyModule.methods) { continue; } } actClass.setSuperClass(rubyModule.newIncludeClass(actClass.getSuperClass())); actClass = actClass.getSuperClass(); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
/* Fixed to Ruby 1.6.5 */ for (RubyModule actClass = this; rubyModule != null; rubyModule = rubyModule.getSuperClass()) { for (RubyModule rbClass = actClass.getSuperClass(); rbClass != null; rbClass = rbClass.getSuperClass()) { if (rbClass.isIncluded() && rbClass.methods == rubyModule.methods) { continue; } } actClass.setSuperClass(rubyModule.newIncludeClass(actClass.getSuperClass())); actClass = actClass.getSuperClass(); } } | /* Fixed to Ruby 1.6.5 */ for (RubyModule actClass = this; rubyModule != null; rubyModule = rubyModule.getSuperClass()) { for (RubyModule rbClass = actClass.getSuperClass(); rbClass != null; rbClass = rbClass.getSuperClass()) { if (rbClass.isIncluded() && rbClass.methods == rubyModule.methods) { continue; } } actClass.setSuperClass(rubyModule.newIncludeClass(actClass.getSuperClass())); actClass = actClass.getSuperClass(); } } | public void includeModule(RubyModule rubyModule) { if (rubyModule == null || rubyModule == this) { return; } /* Fixed to Ruby 1.6.5 */ for (RubyModule actClass = this; rubyModule != null; rubyModule = rubyModule.getSuperClass()) { for (RubyModule rbClass = actClass.getSuperClass(); rbClass != null; rbClass = rbClass.getSuperClass()) { if (rbClass.isIncluded() && rbClass.methods == rubyModule.methods) { continue; } } actClass.setSuperClass(rubyModule.newIncludeClass(actClass.getSuperClass())); actClass = actClass.getSuperClass(); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
return false; } | return false; } | public boolean isClass() { return false; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
RubyModule tmp = this; while (tmp != null) { if (tmp.getInstanceVariables() != null && tmp.getInstanceVariables().get(id) != null) { return true; } tmp = tmp.getSuperClass(); } return false; } | RubyModule tmp = this; while (tmp != null) { if (tmp.getInstanceVariables() != null && tmp.getInstanceVariables().get(id) != null) { return true; } tmp = tmp.getSuperClass(); } return false; } | public boolean isClassVarDefined(RubyId id) { RubyModule tmp = this; while (tmp != null) { if (tmp.getInstanceVariables() != null && tmp.getInstanceVariables().get(id) != null) { return true; } tmp = tmp.getSuperClass(); } return false; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
for (RubyModule tmp = this; tmp != null; tmp = tmp.getSuperClass()) { if (tmp.getInstanceVariables() != null && tmp.getInstanceVariables().get(id) != null) { return true; } } | for (RubyModule tmp = this; tmp != null; tmp = tmp.getSuperClass()) { if (tmp.getInstanceVariables() != null && tmp.getInstanceVariables().get(id) != null) { return true; } } | public boolean isConstantDefined(RubyId id) { for (RubyModule tmp = this; tmp != null; tmp = tmp.getSuperClass()) { if (tmp.getInstanceVariables() != null && tmp.getInstanceVariables().get(id) != null) { return true; } } if (isModule()) { return getRuby().getClasses().getObjectClass().isConstantDefined(id); } if (getRuby().isClassDefined(id)) { return true; } return getRuby().isAutoloadDefined(id); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
if (isModule()) { return getRuby().getClasses().getObjectClass().isConstantDefined(id); } | if (isModule()) { return getRuby().getClasses().getObjectClass().isConstantDefined(id); } | public boolean isConstantDefined(RubyId id) { for (RubyModule tmp = this; tmp != null; tmp = tmp.getSuperClass()) { if (tmp.getInstanceVariables() != null && tmp.getInstanceVariables().get(id) != null) { return true; } } if (isModule()) { return getRuby().getClasses().getObjectClass().isConstantDefined(id); } if (getRuby().isClassDefined(id)) { return true; } return getRuby().isAutoloadDefined(id); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
if (getRuby().isClassDefined(id)) { return true; } | if (getRuby().isClassDefined(id)) { return true; } | public boolean isConstantDefined(RubyId id) { for (RubyModule tmp = this; tmp != null; tmp = tmp.getSuperClass()) { if (tmp.getInstanceVariables() != null && tmp.getInstanceVariables().get(id) != null) { return true; } } if (isModule()) { return getRuby().getClasses().getObjectClass().isConstantDefined(id); } if (getRuby().isClassDefined(id)) { return true; } return getRuby().isAutoloadDefined(id); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
return getRuby().isAutoloadDefined(id); } | return getRuby().isAutoloadDefined(id); } | public boolean isConstantDefined(RubyId id) { for (RubyModule tmp = this; tmp != null; tmp = tmp.getSuperClass()) { if (tmp.getInstanceVariables() != null && tmp.getInstanceVariables().get(id) != null) { return true; } } if (isModule()) { return getRuby().getClasses().getObjectClass().isConstantDefined(id); } if (getRuby().isClassDefined(id)) { return true; } return getRuby().isAutoloadDefined(id); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
return this.included; } | return this.included; } | public boolean isIncluded() { return this.included; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
RubyMethodCacheEntry entry = RubyMethodCacheEntry.getEntry(getRuby(), this, id); | RubyMethodCacheEntry entry = RubyMethodCacheEntry.getEntry(getRuby(), this, id); if (entry != null) { if (ex != 0 && (entry.getNoex() & Constants.NOEX_PRIVATE) != 0) { return false; } else if (entry.getMethod() == null) { return false; } else { return true; } } | private boolean isMethodBound(RubyId id, int ex) { RubyMethodCacheEntry entry = RubyMethodCacheEntry.getEntry(getRuby(), this, id); if (entry != null) { if (ex != 0 && (entry.getNoex() & Constants.NOEX_PRIVATE) != 0) { return false; } else if (entry.getMethod() == null) { return false; } else { return true; } } GetMethodBodyResult gmbr = getMethodBody(id, ex); if (gmbr != null) { if (ex != 0 && (gmbr.getNoex() & Constants.NOEX_PRIVATE) != 0) { return false; } else { return true; } } return false; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
if (entry != null) { if (ex != 0 && (entry.getNoex() & Constants.NOEX_PRIVATE) != 0) { return false; } else if (entry.getMethod() == null) { return false; } else { return true; } } GetMethodBodyResult gmbr = getMethodBody(id, ex); if (gmbr != null) { if (ex != 0 && (gmbr.getNoex() & Constants.NOEX_PRIVATE) != 0) { return false; } else { return true; } } return false; } | GetMethodBodyResult gmbr = getMethodBody(id, ex); if (gmbr != null) { if (ex != 0 && (gmbr.getNoex() & Constants.NOEX_PRIVATE) != 0) { return false; } else { return true; } } return false; } | private boolean isMethodBound(RubyId id, int ex) { RubyMethodCacheEntry entry = RubyMethodCacheEntry.getEntry(getRuby(), this, id); if (entry != null) { if (ex != 0 && (entry.getNoex() & Constants.NOEX_PRIVATE) != 0) { return false; } else if (entry.getMethod() == null) { return false; } else { return true; } } GetMethodBodyResult gmbr = getMethodBody(id, ex); if (gmbr != null) { if (ex != 0 && (gmbr.getNoex() & Constants.NOEX_PRIVATE) != 0) { return false; } else { return true; } } return false; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
return !isIncluded(); } | return !isIncluded(); } | public boolean isModule() { return !isIncluded(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
return this.singleton; } | return this.singleton; } | public boolean isSingleton() { return this.singleton; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
RubyArray ary = RubyArray.m_newArray(getRuby()); | RubyArray ary = RubyArray.m_newArray(getRuby()); | public RubyArray m_ancestors() { RubyArray ary = RubyArray.m_newArray(getRuby()); for (RubyModule p = this; p != null; p = p.getSuperClass()) { if (p.isSingleton()) { continue; } if (p.isIncluded()) { ary.push(p.getRubyClass()); } else { ary.push(p); } } return ary; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
for (RubyModule p = this; p != null; p = p.getSuperClass()) { if (p.isSingleton()) { continue; } | for (RubyModule p = this; p != null; p = p.getSuperClass()) { if (p.isSingleton()) { continue; } | public RubyArray m_ancestors() { RubyArray ary = RubyArray.m_newArray(getRuby()); for (RubyModule p = this; p != null; p = p.getSuperClass()) { if (p.isSingleton()) { continue; } if (p.isIncluded()) { ary.push(p.getRubyClass()); } else { ary.push(p); } } return ary; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
if (p.isIncluded()) { ary.push(p.getRubyClass()); } else { ary.push(p); } } | if (p.isIncluded()) { ary.push(p.getRubyClass()); } else { ary.push(p); } } | public RubyArray m_ancestors() { RubyArray ary = RubyArray.m_newArray(getRuby()); for (RubyModule p = this; p != null; p = p.getSuperClass()) { if (p.isSingleton()) { continue; } if (p.isIncluded()) { ary.push(p.getRubyClass()); } else { ary.push(p); } } return ary; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
return ary; } | return ary; } | public RubyArray m_ancestors() { RubyArray ary = RubyArray.m_newArray(getRuby()); for (RubyModule p = this; p != null; p = p.getSuperClass()) { if (p.isSingleton()) { continue; } if (p.isIncluded()) { ary.push(p.getRubyClass()); } else { ary.push(p); } } return ary; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
module.includeModule(this); return this; } | module.includeModule(this); return this; } | public RubyObject m_append_features(RubyModule module) { module.includeModule(this); return this; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
boolean writeable = false; if (args.length > 0) { writeable = args[0].isTrue(); } | boolean writeable = false; if (args.length > 0) { writeable = args[0].isTrue(); } | public RubyObject m_attr(RubySymbol symbol, RubyObject[] args) { boolean writeable = false; if (args.length > 0) { writeable = args[0].isTrue(); } addAttribute(symbol.toId(), true, writeable, true); return getRuby().getNil(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
addAttribute(symbol.toId(), true, writeable, true); | addAttribute(symbol.toId(), true, writeable, true); | public RubyObject m_attr(RubySymbol symbol, RubyObject[] args) { boolean writeable = false; if (args.length > 0) { writeable = args[0].isTrue(); } addAttribute(symbol.toId(), true, writeable, true); return getRuby().getNil(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
return getRuby().getNil(); } | return getRuby().getNil(); } | public RubyObject m_attr(RubySymbol symbol, RubyObject[] args) { boolean writeable = false; if (args.length > 0) { writeable = args[0].isTrue(); } addAttribute(symbol.toId(), true, writeable, true); return getRuby().getNil(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
for (int i = 0; i < args.length; i++) { addAttribute(((RubySymbol) args[i]).toId(), true, true, true); } | for (int i = 0; i < args.length; i++) { addAttribute(((RubySymbol) args[i]).toId(), true, true, true); } | public RubyObject m_attr_accessor(RubyObject[] args) { for (int i = 0; i < args.length; i++) { addAttribute(((RubySymbol) args[i]).toId(), true, true, true); } return getRuby().getNil(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
return getRuby().getNil(); } | return getRuby().getNil(); } | public RubyObject m_attr_accessor(RubyObject[] args) { for (int i = 0; i < args.length; i++) { addAttribute(((RubySymbol) args[i]).toId(), true, true, true); } return getRuby().getNil(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
for (int i = 0; i < args.length; i++) { addAttribute(((RubySymbol) args[i]).toId(), true, false, true); } | for (int i = 0; i < args.length; i++) { addAttribute(((RubySymbol) args[i]).toId(), true, false, true); } | public RubyObject m_attr_reader(RubyObject[] args) { for (int i = 0; i < args.length; i++) { addAttribute(((RubySymbol) args[i]).toId(), true, false, true); } return getRuby().getNil(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
return getRuby().getNil(); } | return getRuby().getNil(); } | public RubyObject m_attr_reader(RubyObject[] args) { for (int i = 0; i < args.length; i++) { addAttribute(((RubySymbol) args[i]).toId(), true, false, true); } return getRuby().getNil(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
for (int i = 0; i < args.length; i++) { addAttribute(((RubySymbol) args[i]).toId(), false, true, true); } | for (int i = 0; i < args.length; i++) { addAttribute(((RubySymbol) args[i]).toId(), false, true, true); } | public RubyObject m_attr_writer(RubyObject[] args) { for (int i = 0; i < args.length; i++) { addAttribute(((RubySymbol) args[i]).toId(), false, true, true); } return getRuby().getNil(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
return getRuby().getNil(); } | return getRuby().getNil(); } | public RubyObject m_attr_writer(RubyObject[] args) { for (int i = 0; i < args.length; i++) { addAttribute(((RubySymbol) args[i]).toId(), false, true, true); } return getRuby().getNil(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
RubyArray ary = RubyArray.m_newArray(getRuby()); | RubyArray ary = RubyArray.m_newArray(getRuby()); | public RubyArray m_class_variables() { RubyArray ary = RubyArray.m_newArray(getRuby()); RubyModule rbModule = this; if (isSingleton()) { rbModule = ((RubyObject) rbModule.getInstanceVar("__atached__")).getClassVarSingleton(); } while (rbModule != null) { if (rbModule.getInstanceVariables() != null) { Iterator iter = rbModule.getInstanceVariables().keySet().iterator(); while (iter.hasNext()) { RubyId id = (RubyId) iter.next(); if (id.isClassId()) { RubyString kval = RubyString.m_newString(getRuby(), id.toName()); if (ary.m_includes(kval).isFalse()) { ary.push(kval); } } } } rbModule = rbModule.getSuperClass(); } return ary; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
RubyModule rbModule = this; | RubyModule rbModule = this; | public RubyArray m_class_variables() { RubyArray ary = RubyArray.m_newArray(getRuby()); RubyModule rbModule = this; if (isSingleton()) { rbModule = ((RubyObject) rbModule.getInstanceVar("__atached__")).getClassVarSingleton(); } while (rbModule != null) { if (rbModule.getInstanceVariables() != null) { Iterator iter = rbModule.getInstanceVariables().keySet().iterator(); while (iter.hasNext()) { RubyId id = (RubyId) iter.next(); if (id.isClassId()) { RubyString kval = RubyString.m_newString(getRuby(), id.toName()); if (ary.m_includes(kval).isFalse()) { ary.push(kval); } } } } rbModule = rbModule.getSuperClass(); } return ary; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
if (isSingleton()) { rbModule = ((RubyObject) rbModule.getInstanceVar("__atached__")).getClassVarSingleton(); } | if (isSingleton()) { rbModule = ((RubyObject) rbModule.getInstanceVar("__atached__")).getClassVarSingleton(); } | public RubyArray m_class_variables() { RubyArray ary = RubyArray.m_newArray(getRuby()); RubyModule rbModule = this; if (isSingleton()) { rbModule = ((RubyObject) rbModule.getInstanceVar("__atached__")).getClassVarSingleton(); } while (rbModule != null) { if (rbModule.getInstanceVariables() != null) { Iterator iter = rbModule.getInstanceVariables().keySet().iterator(); while (iter.hasNext()) { RubyId id = (RubyId) iter.next(); if (id.isClassId()) { RubyString kval = RubyString.m_newString(getRuby(), id.toName()); if (ary.m_includes(kval).isFalse()) { ary.push(kval); } } } } rbModule = rbModule.getSuperClass(); } return ary; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
while (rbModule != null) { if (rbModule.getInstanceVariables() != null) { Iterator iter = rbModule.getInstanceVariables().keySet().iterator(); while (iter.hasNext()) { RubyId id = (RubyId) iter.next(); if (id.isClassId()) { RubyString kval = RubyString.m_newString(getRuby(), id.toName()); if (ary.m_includes(kval).isFalse()) { ary.push(kval); } } } } rbModule = rbModule.getSuperClass(); } | while (rbModule != null) { if (rbModule.getInstanceVariables() != null) { Iterator iter = rbModule.getInstanceVariables().keySet().iterator(); while (iter.hasNext()) { RubyId id = (RubyId) iter.next(); if (id.isClassId()) { RubyString kval = RubyString.m_newString(getRuby(), id.toName()); if (ary.m_includes(kval).isFalse()) { ary.push(kval); } } } } rbModule = rbModule.getSuperClass(); } | public RubyArray m_class_variables() { RubyArray ary = RubyArray.m_newArray(getRuby()); RubyModule rbModule = this; if (isSingleton()) { rbModule = ((RubyObject) rbModule.getInstanceVar("__atached__")).getClassVarSingleton(); } while (rbModule != null) { if (rbModule.getInstanceVariables() != null) { Iterator iter = rbModule.getInstanceVariables().keySet().iterator(); while (iter.hasNext()) { RubyId id = (RubyId) iter.next(); if (id.isClassId()) { RubyString kval = RubyString.m_newString(getRuby(), id.toName()); if (ary.m_includes(kval).isFalse()) { ary.push(kval); } } } } rbModule = rbModule.getSuperClass(); } return ary; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
return ary; } | return ary; } | public RubyArray m_class_variables() { RubyArray ary = RubyArray.m_newArray(getRuby()); RubyModule rbModule = this; if (isSingleton()) { rbModule = ((RubyObject) rbModule.getInstanceVar("__atached__")).getClassVarSingleton(); } while (rbModule != null) { if (rbModule.getInstanceVariables() != null) { Iterator iter = rbModule.getInstanceVariables().keySet().iterator(); while (iter.hasNext()) { RubyId id = (RubyId) iter.next(); if (id.isClassId()) { RubyString kval = RubyString.m_newString(getRuby(), id.toName()); if (ary.m_includes(kval).isFalse()) { ary.push(kval); } } } } rbModule = rbModule.getSuperClass(); } return ary; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.