Buggy code:
public class Script extends BaseObj { private boolean mUseIncSupp ; protected void setIncSupp ( boolean useInc ) { } protected boolean isIncSupp ( ) { } private long getDummyAlloc ( Allocation ain ) { } public static final class KernelID extends BaseObj { android . renderscript . Script . KernelID mN ; Script mScript ; int mSlot ; int mSig ; KernelID ( long id , RenderScript rs , Script s , int slot , int sig ) { } } private final SparseArray < Script . KernelID > mKIDs = new SparseArray < Script . KernelID > ( ) ; protected Script . KernelID createKernelID ( int slot , int sig , Element ein , Element eout ) { } public static final class InvokeID extends BaseObj { Script mScript ; int mSlot ; InvokeID ( long id , RenderScript rs , Script s , int slot ) { } } private final SparseArray < Script . InvokeID > mIIDs = new SparseArray < Script . InvokeID > ( ) ; protected Script . InvokeID createInvokeID ( int slot ) { } public static final class FieldID extends BaseObj { android . renderscript . Script . FieldID mN ; Script mScript ; int mSlot ; FieldID ( long id , RenderScript rs , Script s , int slot ) { } } private final SparseArray < Script . FieldID > mFIDs = new SparseArray ( ) ; protected Script . FieldID createFieldID ( int slot , Element e ) { } protected void invoke ( int slot ) { } protected void invoke ( int slot , FieldPacker v ) { } public void bindAllocation ( Allocation va , int slot ) { } public void setTimeZone ( String timeZone ) { } protected void forEach ( int slot , Allocation ain , Allocation aout , FieldPacker v ) { } protected void forEach ( int slot , Allocation ain , Allocation aout , FieldPacker v , Script . LaunchOptions sc ) { } Script ( long id , RenderScript rs ) { } public void setVar ( int index , float v ) { } public void setVar ( int index , double v ) { } public void setVar ( int index , int v ) { } public void setVar ( int index , long v ) { <START_BUG> mRS . nScriptSetVarD ( getID ( mRS ) , index , v , mUseIncSupp ) ; <END_BUG> } public void setVar ( int index , boolean v ) { } public void setVar ( int index , BaseObj o ) { } public void setVar ( int index , FieldPacker v ) { } public void setVar ( int index , FieldPacker v , Element e , int [ ] dims ) { } public static class Builder { RenderScript mRS ; Builder ( RenderScript rs ) { } } public static class FieldBase { protected Element mElement ; protected Allocation mAllocation ; protected void init ( RenderScript rs , int dimx ) { } protected void init ( RenderScript rs , int dimx , int usages ) { } protected FieldBase ( ) { } public Element getElement ( ) { } public Type getType ( ) { } public Allocation getAllocation ( ) { } public void updateAllocation ( ) { } } public static final class LaunchOptions { private int xstart = 0 ; private int ystart = 0 ; private int xend = 0 ; private int yend = 0 ; private int zstart = 0 ; private int zend = 0 ; private int strategy ; public Script . LaunchOptions setX ( int xstartArg , int xendArg ) { } public Script . LaunchOptions setY ( int ystartArg , int yendArg ) { } public Script . LaunchOptions setZ ( int zstartArg , int zendArg ) { } public int getXStart ( ) { } public int getXEnd ( ) { } public int getYStart ( ) { } public int getYEnd ( ) { } public int getZStart ( ) { } public int getZEnd ( ) { } } }

Fix:
mRS . nScriptSetVarJ ( getID ( mRS ) , index , v , mUseIncSupp ) ;