type
stringclasses
1 value
dataset
stringclasses
1 value
input
stringlengths
75
160k
instruction
stringlengths
117
171
output
stringlengths
88
168k
Inversion-Mutation
megadiff
"@Override public void onScanCompleted(String path, Uri uri) { mActivity.runOnUiThread(new Runnable() { @Override public void run() { Toast.makeText(mActivity, R.string.added_face_to_gallery_toast, Toast.LENGTH_LONG).show(); mActivity = null; } }); mConn.disconnect(); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onScanCompleted"
"@Override public void onScanCompleted(String path, Uri uri) { mActivity.runOnUiThread(new Runnable() { @Override public void run() { Toast.makeText(mActivity, R.string.added_face_to_gallery_toast, Toast.LENGTH_LONG).show(); } }); mConn.disconnect(); <MASK>mActivity = null;</MASK> }"
Inversion-Mutation
megadiff
"@Test public void testSampling() throws Exception { AbstractContinuousDistribution dist = (AbstractContinuousDistribution) makeDistribution(); final int sampleSize = 1000; dist.reseedRandomGenerator(1000); // Use fixed seed double[] sample = dist.sample(sampleSize); d...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "testSampling"
"@Test public void testSampling() throws Exception { AbstractContinuousDistribution dist = (AbstractContinuousDistribution) makeDistribution(); final int sampleSize = 1000; double[] sample = dist.sample(sampleSize); double[] quartiles = TestUtils.getDistributionQuartiles(dist);...
Inversion-Mutation
megadiff
"@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); super.setIntegerProperty("loadUrlTimeoutValue", 10000); super.loadUrl("file:///android_asset/www/index.html"); // Display vertical scrollbar and hide horizontal scrollBar...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onCreate"
"@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); <MASK>super.loadUrl("file:///android_asset/www/index.html");</MASK> super.setIntegerProperty("loadUrlTimeoutValue", 10000); // Display vertical scrollbar and hide horizon...
Inversion-Mutation
megadiff
"public void setBody(Body body) throws MessagingException { this.mBody = body; setHeader("MIME-Version", "1.0"); if (body instanceof com.fsck.k9.mail.Multipart) { com.fsck.k9.mail.Multipart multipart = ((com.fsck.k9.mail.Multipart)body); multipart.setPa...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setBody"
"public void setBody(Body body) throws MessagingException { this.mBody = body; if (body instanceof com.fsck.k9.mail.Multipart) { com.fsck.k9.mail.Multipart multipart = ((com.fsck.k9.mail.Multipart)body); multipart.setParent(this); setHeader(MimeHea...
Inversion-Mutation
megadiff
"public void check(Event event) { if (!checkerEnabled) { return; } checkerEnabled = false; System.out.print("Received event id " + event.id + "\nStates: ["); //DBG for (State state : states) //DBG System.out.println("\n vertex: "...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "check"
"public void check(Event event) { if (!checkerEnabled) { return; } checkerEnabled = false; System.out.print("Received event id " + event.id + "\nStates: ["); //DBG for (State state : states) //DBG System.out.println("\n vertex: "...
Inversion-Mutation
megadiff
"private void sendFile( String filename, HttpServletResponse response ) throws IOException { log.info("Requested download of [" + filename + "]"); DownloadableFilesRegistry filesRegistry = (DownloadableFilesRegistry) getComponent("DownloadableFilesRegistry"); Experiments experiments = (E...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "sendFile"
"private void sendFile( String filename, HttpServletResponse response ) throws IOException { log.info("Requested download of [" + filename + "]"); DownloadableFilesRegistry filesRegistry = (DownloadableFilesRegistry) getComponent("DownloadableFilesRegistry"); Experiments experiments = (E...
Inversion-Mutation
megadiff
"protected List<EEFGenModel> initEEFGenModel() throws IOException { if (!selectedFiles.isEmpty()) { for (IFile selectedFile : selectedFiles) { ResourceSet resourceSet = new ResourceSetImpl(); URI modelURI = URI.createPlatformResourceURI(selectedFile.getFullPath().toString(), true); String fileExt...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "initEEFGenModel"
"protected List<EEFGenModel> initEEFGenModel() throws IOException { if (!selectedFiles.isEmpty()) { <MASK>ResourceSet resourceSet = new ResourceSetImpl();</MASK> for (IFile selectedFile : selectedFiles) { URI modelURI = URI.createPlatformResourceURI(selectedFile.getFullPath().toString(), true); St...
Inversion-Mutation
megadiff
"public Object intercept(Object enhanced, Method method, Object[] args, MethodProxy methodProxy) throws Throwable { final String methodName = method.getName(); try { synchronized (lazyLoader) { if (WRITE_REPLACE_METHOD.equals(methodName)) { Object original = null; ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "intercept"
"public Object intercept(Object enhanced, Method method, Object[] args, MethodProxy methodProxy) throws Throwable { final String methodName = method.getName(); try { synchronized (lazyLoader) { if (WRITE_REPLACE_METHOD.equals(methodName)) { Object original = null; ...
Inversion-Mutation
megadiff
"private void loadClass(final String classname) { try { if (classloader == null) { if (getKeyValue("requires", "parent", "").isEmpty()) { classloader = new PluginClassLoader(this); } else { final String parentName = getKey...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "loadClass"
"private void loadClass(final String classname) { try { if (classloader == null) { if (getKeyValue("requires", "parent", "").isEmpty()) { classloader = new PluginClassLoader(this); } else { final String parentName = getKey...
Inversion-Mutation
megadiff
"private Value evalCons(Cons sexp) { String fn = ((Symbol) sexp.head).sym; if (fn.equals("ite")) { return isTrue(eval(sexp.args.get(0))) ? eval(sexp.args.get(1)) : eval(sexp.args.get(2)); } else if (fn.equals("and")) { for (Sexp arg : sexp.args) { if (!isTrue(eval(arg))) { return BoolValue.F...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "evalCons"
"private Value evalCons(Cons sexp) { String fn = ((Symbol) sexp.head).sym; if (fn.equals("ite")) { return isTrue(eval(sexp.args.get(0))) ? eval(sexp.args.get(1)) : eval(sexp.args.get(2)); } else if (fn.equals("and")) { for (Sexp arg : sexp.args) { if (!isTrue(eval(arg))) { return BoolValue.F...
Inversion-Mutation
megadiff
"@Override public boolean inputSet() { try { if (trace) GitTraceLocation.getTrace().traceEntry( GitTraceLocation.HISTORYVIEW.getLocation()); if (this.input != null) return true; cancelRefreshJob(); Object o = super.getInput(); if (o == null) { setErrorMessage(UIText.Git...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "inputSet"
"@Override public boolean inputSet() { try { if (trace) GitTraceLocation.getTrace().traceEntry( GitTraceLocation.HISTORYVIEW.getLocation()); if (this.input != null) return true; cancelRefreshJob(); <MASK>setErrorMessage(null);</MASK> Object o = super.getInput(); if (o == ...
Inversion-Mutation
megadiff
"@Override public void build(XmlWriter sceneXml, XmlWriter assetsXml, String sceneName) throws IOException { sceneXml. element("gameObject"). attribute("name", name). element("pos"). attribute("x", pos.x). attribute(...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "build"
"@Override public void build(XmlWriter sceneXml, XmlWriter assetsXml, String sceneName) throws IOException { sceneXml. <MASK>attribute("name", name).</MASK> element("gameObject"). element("pos"). attribute("x", pos.x). a...
Inversion-Mutation
megadiff
"public List<CopyTask> computeTasksList() throws IOException { checkArgs(sources, target); // Compute the recursive target list, so that subsequent existence checks on subfiles work if (target.isDirectory()) { target.grecursiveList(); } for (GeneralizedFile ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "computeTasksList"
"public List<CopyTask> computeTasksList() throws IOException { checkArgs(sources, target); // Compute the recursive target list, so that subsequent existence checks on subfiles work if (target.isDirectory()) { target.grecursiveList(); } for (GeneralizedFile ...
Inversion-Mutation
megadiff
"private synchronized void paintBuffered(Graphics g) { do { GraphicsConfiguration config = getGraphicsConfiguration(); int width = getWidth(); int height = getHeight(); if (backBuffer == null || width != backBuffer.getWidth() || height != backBuffer.getHeight...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "paintBuffered"
"private synchronized void paintBuffered(Graphics g) { do { GraphicsConfiguration config = getGraphicsConfiguration(); int width = getWidth(); int height = getHeight(); if (backBuffer == null || width != backBuffer.getWidth() || height != backBuffer.getHeight...
Inversion-Mutation
megadiff
"public void onEnable() { try { initsuccess = false; deleteConfirm = new HashMap<String, String>(); server = this.getServer(); dataFolder = this.getDataFolder(); if (!new File(dataFolder, "config.yml").isFile()) { this.writeDefau...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onEnable"
"public void onEnable() { try { initsuccess = false; deleteConfirm = new HashMap<String, String>(); server = this.getServer(); dataFolder = this.getDataFolder(); if (!new File(dataFolder, "config.yml").isFile()) { this.writeDefau...
Inversion-Mutation
megadiff
"private boolean login(String username, String host, int port) { Client client = freeColClient.getClient(); Canvas canvas = freeColClient.getCanvas(); if (client != null) { client.disconnect(); } try { client = new Client(host, port, freeColClie...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "login"
"private boolean login(String username, String host, int port) { Client client = freeColClient.getClient(); Canvas canvas = freeColClient.getCanvas(); if (client != null) { client.disconnect(); } try { client = new Client(host, port, freeColClie...
Inversion-Mutation
megadiff
"public final synchronized void get(final long index, final byte[] b, final int start) throws IOException { Long idx = Long.valueOf(index); final byte[] bb; synchronized (this) { assert b.length - start >= efs.recordsize; bb = buffer.get(idx); if (bb ==...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "get"
"public final synchronized void get(final long index, final byte[] b, final int start) throws IOException { Long idx = Long.valueOf(index); final byte[] bb; synchronized (this) { assert b.length - start >= efs.recordsize; <MASK>if (index >= size()) throw new IndexOut...
Inversion-Mutation
megadiff
"private static Class makeClass(Class referent, Vector secondary, String name, ByteArrayOutputStream bytes) { Vector referents = null; if (secondary != null) { if (referent != null) { secondary.insertElementAt(referent,0); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "makeClass"
"private static Class makeClass(Class referent, Vector secondary, String name, ByteArrayOutputStream bytes) { Vector referents = null; if (secondary != null) { if (referent != null) { secondary.insertElementAt(referent,0); ...
Inversion-Mutation
megadiff
"protected void cleanup(Context ctx) throws IOException, InterruptedException { super.cleanup(ctx); instance.maybeCallMethod("cleanup", ctx); instance.cleanup(ctx.getConfiguration()); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "cleanup"
"protected void cleanup(Context ctx) throws IOException, InterruptedException { super.cleanup(ctx); <MASK>instance.cleanup(ctx.getConfiguration());</MASK> instance.maybeCallMethod("cleanup", ctx); }"
Inversion-Mutation
megadiff
"public static Result showSubmissions() { Map<String, String> dataMap = Form.form().bindFromRequest().data(); String taskTitle = dataMap.get("task"); SelectEntity<PhoenixTask> taskSelector = new SelectEntity<PhoenixTask>(); taskSelector.addKey("title", taskTitle); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "showSubmissions"
"public static Result showSubmissions() { Map<String, String> dataMap = Form.form().bindFromRequest().data(); String taskTitle = dataMap.get("task"); SelectEntity<PhoenixTask> taskSelector = new SelectEntity<PhoenixTask>(); taskSelector.addKey("title", taskTitle); ...
Inversion-Mutation
megadiff
"public int queue(OutboundMessage message) throws Exception { if ((getPreQueueHook() != null) && !getPreQueueHook().process(message)) { message.setSentStatus(SentStatus.Failed); message.setFailureCause(FailureCause.Cancelled); return 0; } int messageCount = 0; LinkedList<OutboundMessage> m...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "queue"
"public int queue(OutboundMessage message) throws Exception { <MASK>int messageCount = 0;</MASK> if ((getPreQueueHook() != null) && !getPreQueueHook().process(message)) { message.setSentStatus(SentStatus.Failed); message.setFailureCause(FailureCause.Cancelled); return 0; } LinkedList<Outbo...
Inversion-Mutation
megadiff
"private void handleUpdateSchedule() { final SchedulerToolbarController localThis = this; scheduleCreatorDialog.setTitle( MSGS.scheduleEditor() ); final List<Schedule> scheduleList = schedulesListCtrl.getSelectedSchedules(); scheduleCreatorDialog.setOnOkHandler( new ICallback<MessageDialog>(...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "handleUpdateSchedule"
"private void handleUpdateSchedule() { final SchedulerToolbarController localThis = this; scheduleCreatorDialog.setTitle( MSGS.scheduleEditor() ); final List<Schedule> scheduleList = schedulesListCtrl.getSelectedSchedules(); scheduleCreatorDialog.setOnOkHandler( new ICallback<MessageDialog>(...
Inversion-Mutation
megadiff
"@Override public void onResumeAfterSuper() { if (mActivity.mOpenCameraFail || mActivity.mCameraDisabled) return; mZoomValue = 0; showVideoSnapshotUI(false); mUI.enableShutter(false); if (!mPreviewing && mStartPreviewThread == null) { rese...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onResumeAfterSuper"
"@Override public void onResumeAfterSuper() { if (mActivity.mOpenCameraFail || mActivity.mCameraDisabled) return; <MASK>mUI.enableShutter(false);</MASK> mZoomValue = 0; showVideoSnapshotUI(false); if (!mPreviewing && mStartPreviewThread == null) { ...
Inversion-Mutation
megadiff
"public void stop(BundleContext inContext) throws Exception { unregisterGCTrigger(); GCActivator.context = null; }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "stop"
"public void stop(BundleContext inContext) throws Exception { <MASK>GCActivator.context = null;</MASK> unregisterGCTrigger(); }"
Inversion-Mutation
megadiff
"public static void sparks(GL2 gl, Color color) { //Use the same seed every time Random r = new Random(0); float[] c = new float[4]; convertColor(color, c); for (int i = 0; i < 3; i++) c[i] = c[i] * .3f + .7f; gl.glColor4fv(c, 0); for (int i = 0; i < 200; i++) { final float z = 2 * ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "sparks"
"public static void sparks(GL2 gl, Color color) { //Use the same seed every time Random r = new Random(0); float[] c = new float[4]; convertColor(color, c); for (int i = 0; i < 3; i++) c[i] = c[i] * .3f + .7f; gl.glColor4fv(c, 0); for (int i = 0; i < 200; i++) { final float z = 2 * ...
Inversion-Mutation
megadiff
"protected void doWriteObject(final Object original, final boolean unshared) throws IOException { final ClassExternalizerFactory classExternalizerFactory = this.classExternalizerFactory; final ObjectResolver objectResolver = this.objectResolver; Object obj = original; Class<?> objCla...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doWriteObject"
"protected void doWriteObject(final Object original, final boolean unshared) throws IOException { final ClassExternalizerFactory classExternalizerFactory = this.classExternalizerFactory; final ObjectResolver objectResolver = this.objectResolver; Object obj = original; Class<?> objCla...
Inversion-Mutation
megadiff
"@Override public boolean onItemUseFirst(ItemStack itemStack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) { int blockID = world.getBlockId(x, y, z); int meta = world.getBlockMetadata(x, y, z); TileEntity tile = world.getBlockTileEntity(x, y, z); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onItemUseFirst"
"@Override public boolean onItemUseFirst(ItemStack itemStack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) { int blockID = world.getBlockId(x, y, z); int meta = world.getBlockMetadata(x, y, z); TileEntity tile = world.getBlockTileEntity(x, y, z); ...
Inversion-Mutation
megadiff
"public RunAutomaton(Automaton a, int maxInterval, boolean tableize) { this.maxInterval = maxInterval; a.determinize(); points = a.getStartPoints(); final State[] states = a.getNumberedStates(); initial = a.initial.number; size = states.length; accept = new boolean[size]; transi...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "RunAutomaton"
"public RunAutomaton(Automaton a, int maxInterval, boolean tableize) { this.maxInterval = maxInterval; a.determinize(); points = a.getStartPoints(); <MASK>initial = a.initial.number;</MASK> final State[] states = a.getNumberedStates(); size = states.length; accept = new boolean[size]...
Inversion-Mutation
megadiff
"@AfterRender void setJS() { JSONObject setup = new JSONObject(); setup.put("id", getClientId()); JSONObject dataTableParams = new JSONObject(); if (getMode()) { dataTableParams.put("sAjaxSource", resources.createEventLink("data").toAbsoluteURI()); dataTableParams.put("bServerSide", "true"...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setJS"
"@AfterRender void setJS() { JSONObject setup = new JSONObject(); setup.put("id", getClientId()); JSONObject dataTableParams = new JSONObject(); if (getMode()) { dataTableParams.put("sAjaxSource", resources.createEventLink("data").toAbsoluteURI()); dataTableParams.put("bServerSide", "true"...
Inversion-Mutation
megadiff
"public void paintComponent(Graphics g) { Rectangle bounds = getBounds(); int width = (int) bounds.getWidth() - 1; int height = (int) bounds.getHeight() - 1; int min = toScreen(getLowValue()); int max = toScreen(getHighValue()); // Paint the full slider if the slider is marked as empty if (empt...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "paintComponent"
"public void paintComponent(Graphics g) { Rectangle bounds = getBounds(); int width = (int) bounds.getWidth() - 1; int height = (int) bounds.getHeight() - 1; int min = toScreen(getLowValue()); int max = toScreen(getHighValue()); // Paint the full slider if the slider is marked as empty if (empt...
Inversion-Mutation
megadiff
"@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.my_tag_activity); if (savedInstanceState != null) { mTagIdInEdit = savedInstanceState.getLong(BUNDLE_KEY_TAG_ID_IN_EDIT, -1); } //...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onCreate"
"@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.my_tag_activity); if (savedInstanceState != null) { mTagIdInEdit = savedInstanceState.getLong(BUNDLE_KEY_TAG_ID_IN_EDIT, -1); } //...
Inversion-Mutation
megadiff
"public void testBuildIndex() { try { indexBuilder.startup(); // run buildIndex indexBuilder.doCommand(new IndexAllCommand(), new IndexBuilderListener() { public void buildSuccess(IndexBuilderEvent event) { try { ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "testBuildIndex"
"public void testBuildIndex() { try { indexBuilder.startup(); // run buildIndex indexBuilder.doCommand(new IndexAllCommand(), new IndexBuilderListener() { public void buildSuccess(IndexBuilderEvent event) { try { ...
Inversion-Mutation
megadiff
"public void buildError(IndexBuilderEvent event) { buildFinished = true; fail(); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "buildError"
"public void buildError(IndexBuilderEvent event) { <MASK>fail();</MASK> buildFinished = true; }"
Inversion-Mutation
megadiff
"private OnClickListener createOnClickVignetteButton() { return new View.OnClickListener() { @Override public void onClick(View v) { hideImageViews(); mImageShow.setVisibility(View.VISIBLE); mImageShow.setShowControls(true); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createOnClickVignetteButton"
"private OnClickListener createOnClickVignetteButton() { return new View.OnClickListener() { @Override public void onClick(View v) { hideImageViews(); mImageShow.setVisibility(View.VISIBLE); mImageShow.setShowControls(true); ...
Inversion-Mutation
megadiff
"@Override public void onClick(View v) { hideImageViews(); mImageShow.setVisibility(View.VISIBLE); mImageShow.setShowControls(true); ImagePreset preset = mImageShow.getImagePreset(); ImageFilter filter = preset.getFilter("...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onClick"
"@Override public void onClick(View v) { hideImageViews(); mImageShow.setVisibility(View.VISIBLE); mImageShow.setShowControls(true); ImagePreset preset = mImageShow.getImagePreset(); ImageFilter filter = preset.getFilter("...
Inversion-Mutation
megadiff
"public Key createGroupPublicKey(GroupManager manager, MembershipList ml) throws ContentEncodingException, IOException, ConfigurationException, InvalidKeyException, InvalidCipherTextException { KeyPairGenerator kpg = null; try { kpg = KeyPairGenerator.getInstance(manager.getGroupKeyAlgorithm()); }...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createGroupPublicKey"
"public Key createGroupPublicKey(GroupManager manager, MembershipList ml) throws ContentEncodingException, IOException, ConfigurationException, InvalidKeyException, InvalidCipherTextException { KeyPairGenerator kpg = null; try { kpg = KeyPairGenerator.getInstance(manager.getGroupKeyAlgorithm()); }...
Inversion-Mutation
megadiff
"public float[] progressToday(TreeSet<Object[]> counts, Card card, boolean eta) { try { int doneCurrent = 0; int[] leftCurrent = new int[]{0, 0, 0}; String[] cs = new String[]{"new", "lrn", "rev"}; long currentDid = 0; // refresh deck progresses with fresh count...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "progressToday"
"public float[] progressToday(TreeSet<Object[]> counts, Card card, boolean eta) { try { int doneCurrent = 0; int[] leftCurrent = new int[]{0, 0, 0}; String[] cs = new String[]{"new", "lrn", "rev"}; long currentDid = 0; // refresh deck progresses with fresh count...
Inversion-Mutation
megadiff
"private ContextGuard(PyObject manager) { __exit__method = manager.__getattr__("__exit__"); __enter__method = manager.__getattr__("__enter__"); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "ContextGuard"
"private ContextGuard(PyObject manager) { <MASK>__enter__method = manager.__getattr__("__enter__");</MASK> __exit__method = manager.__getattr__("__exit__"); }"
Inversion-Mutation
megadiff
"public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) { Player player = (Player) sender; World world = player.getWorld(); this.deathMessage = "boom"; if(commandLabel.equalsIgnoreCase("smite")) { if(args.length == 0) { Block targetblock = player...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onCommand"
"public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) { Player player = (Player) sender; World world = player.getWorld(); this.deathMessage = "boom"; if(commandLabel.equalsIgnoreCase("smite")) { if(args.length == 0) { Block targetblock = player...
Inversion-Mutation
megadiff
"public LinkerModule(InputStream in, ErrorHandler error) { // scan wrap Scanner read = new Scanner(in); ScanWrap reader = new ScanWrap(read, error); //String used for name String ender = ""; //Number of records int mod = 0; int link = 0; int text = 0; //value checking boolean isV...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "LinkerModule"
"public LinkerModule(InputStream in, ErrorHandler error) { // scan wrap Scanner read = new Scanner(in); ScanWrap reader = new ScanWrap(read, error); //String used for name String ender = ""; //Number of records int mod = 0; int link = 0; int text = 0; //value checking boolean isV...
Inversion-Mutation
megadiff
"private GeometryCollection generateSearchGeomCollection() { int collectionSize = 0; for (final GeomWrapper gw : geomWrappers) { if (gw.isSelected()) { collectionSize++; } } final Geometry[] geoms = new Geometry[collectionSize]; fin...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "generateSearchGeomCollection"
"private GeometryCollection generateSearchGeomCollection() { int collectionSize = 0; for (final GeomWrapper gw : geomWrappers) { if (gw.isSelected()) { collectionSize++; } } final Geometry[] geoms = new Geometry[collectionSize]; fin...
Inversion-Mutation
megadiff
"private Hashtable selectDynamicUnBind(Vector scps, ServiceReference serviceReference) { try { if (Activator.DEBUG) { Activator.log.debug("Resolver.selectDynamicUnBind(): entered", null); //$NON-NLS-1$ } Hashtable unbindTable = null; // ReferenceDescription:subTable for (int i = 0; i < scps.siz...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "selectDynamicUnBind"
"private Hashtable selectDynamicUnBind(Vector scps, ServiceReference serviceReference) { try { if (Activator.DEBUG) { Activator.log.debug("Resolver.selectDynamicUnBind(): entered", null); //$NON-NLS-1$ } Hashtable unbindTable = null; // ReferenceDescription:subTable <MASK>Hashtable unbindSubTabl...
Inversion-Mutation
megadiff
"@RequestMapping(value = "/accession", method = RequestMethod.POST) public void doAccession(@RequestParam("file")MultipartFile file, HttpServletResponse response) { //convert input into a sample data object InputStream is; try { is = file.getInputStream(); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doAccession"
"@RequestMapping(value = "/accession", method = RequestMethod.POST) public void doAccession(@RequestParam("file")MultipartFile file, HttpServletResponse response) { //convert input into a sample data object InputStream is; try { is = file.getInputStream(); ...
Inversion-Mutation
megadiff
"public StarTable[] makeStarTables( DataSource datsrc, StoragePolicy storagePolicy) throws IOException { /* If there is a position, use makeStarTable. Otherwise, we want * all the tables. */ String srcpos = datsrc.getPosition(); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "makeStarTables"
"public StarTable[] makeStarTables( DataSource datsrc, StoragePolicy storagePolicy) throws IOException { /* If there is a position, use makeStarTable. Otherwise, we want * all the tables. */ String srcpos = datsrc.getPosition(); ...
Inversion-Mutation
megadiff
"private void loadIdentities() { try { final Map<String, InputStream> identityStreams = getResourceManager().getResourcesStartingWithAsInputStreams("META-INF/identities/"); unloadIdentities(); for (Map.Entry<String, InputStream> entry : identityStreams.entrySet()) { ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "loadIdentities"
"private void loadIdentities() { try { final Map<String, InputStream> identityStreams = getResourceManager().getResourcesStartingWithAsInputStreams("META-INF/identities/"); unloadIdentities(); for (Map.Entry<String, InputStream> entry : identityStreams.entrySet()) { ...
Inversion-Mutation
megadiff
"public void setColorModel(Map<String, String> colorMap) { if(tableModel == null) { tableModel = new DefaultTableModel(); tableModel.addColumn(tr("Name")); tableModel.addColumn(tr("Color")); } // clear old model: while(tableModel.getRowCount(...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setColorModel"
"public void setColorModel(Map<String, String> colorMap) { if(tableModel == null) { tableModel = new DefaultTableModel(); <MASK>tableModel.addColumn(tr("Color"));</MASK> tableModel.addColumn(tr("Name")); } // clear old model: while(tableModel...
Inversion-Mutation
megadiff
"public void render( Display display ) throws IOException { HttpServletRequest request = ContextProvider.getRequest(); // Note [rst] Startup page created in LifecycleServiceHandler#runLifeCycle // TODO [rh] should be replaced by requestCounter != 0 if( request.getParameter( RequestParams.UIROOT ) !=...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "render"
"public void render( Display display ) throws IOException { HttpServletRequest request = ContextProvider.getRequest(); // Note [rst] Startup page created in LifecycleServiceHandler#runLifeCycle // TODO [rh] should be replaced by requestCounter != 0 if( request.getParameter( RequestParams.UIROOT ) !=...
Inversion-Mutation
megadiff
"public void onEnable() { loadConfig(); if (ConnectionManager.initialize()) { localization = Localization.getInstance(config.getString("language","de")); commandList = new CommandList(getServer()); DatabaseManager dbManager = new DatabaseManager(getServer())...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onEnable"
"public void onEnable() { loadConfig(); <MASK>commandList = new CommandList(getServer());</MASK> if (ConnectionManager.initialize()) { localization = Localization.getInstance(config.getString("language","de")); DatabaseManager dbManager = new DatabaseManager(get...
Inversion-Mutation
megadiff
"private void doDownload(final String requestId, final NasProductTemplate template) { if (DownloadManagerDialog.showAskingForUserTitle( CismapBroker.getInstance().getMappingComponent())) { final String jobname = (!DownloadManagerDialog.getJobname().equals("")) ? DownloadMa...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doDownload"
"private void doDownload(final String requestId, final NasProductTemplate template) { if (DownloadManagerDialog.showAskingForUserTitle( CismapBroker.getInstance().getMappingComponent())) { final String jobname = (!DownloadManagerDialog.getJobname().equals("")) ? DownloadMa...
Inversion-Mutation
megadiff
"@Override public void run() { try { int count; Socket socket = serverSocket.accept(); ois = new ObjectInputStream(socket.getInputStream()); byte[] buffer = new byte[bufferSize]; //Obtengo el archivo remoto File pathRemoto = (Fi...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run"
"@Override public void run() { try { int count; Socket socket = serverSocket.accept(); ois = new ObjectInputStream(socket.getInputStream()); byte[] buffer = new byte[bufferSize]; //Obtengo el archivo remoto File pathRemoto = (Fi...
Inversion-Mutation
megadiff
"public void run() { initialize(); while(getState().equals(READY)) { //Pre-Cache SAY tags //Issue 105: http://code.google.com/p/restcomm/issues/detail?id=105 if (context.getCall().getDirection() == Direction.OUTBOUND_DIAL){ if (configuration.getString("pre-cache-outbound").equalsIgnoreCase("true"...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run"
"public void run() { initialize(); while(getState().equals(READY)) { //Pre-Cache SAY tags //Issue 105: http://code.google.com/p/restcomm/issues/detail?id=105 if (context.getCall().getDirection() == Direction.OUTBOUND_DIAL){ if (configuration.getString("pre-cache-outbound").equalsIgnoreCase("true"...
Inversion-Mutation
megadiff
"private void fillViews() { SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(VLCApplication.getAppContext()); float[] bands = null; String[] presets = null; try { libVlc = Util.getLibVlcInstance(); bands = libVlc.getBands(); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "fillViews"
"private void fillViews() { SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(VLCApplication.getAppContext()); float[] bands = null; String[] presets = null; try { libVlc = Util.getLibVlcInstance(); bands = libVlc.getBands(); ...
Inversion-Mutation
megadiff
"public boolean placeApplication(int applicationID, String subject, String body, int childCareTime, int groupID, int schoolTypeID, int employmentTypeID, User user, Locale locale) throws RemoteException { try { ChildCareApplication application = getChildCareApplicationHome().findByPrimaryKey(new Integer(applicati...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "placeApplication"
"public boolean placeApplication(int applicationID, String subject, String body, int childCareTime, int groupID, int schoolTypeID, int employmentTypeID, User user, Locale locale) throws RemoteException { try { ChildCareApplication application = getChildCareApplicationHome().findByPrimaryKey(new Integer(applicati...
Inversion-Mutation
megadiff
"public static void poll(int delta) { if (currentMusic != null) { SoundStore.get().poll(delta); if (!SoundStore.get().isMusicPlaying()) { currentMusic = null; currentMusic.fireMusicEnded(); } } }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "poll"
"public static void poll(int delta) { if (currentMusic != null) { SoundStore.get().poll(delta); if (!SoundStore.get().isMusicPlaying()) { <MASK>currentMusic.fireMusicEnded();</MASK> currentMusic = null; } } }"
Inversion-Mutation
megadiff
"private void setup( boolean addFileUpload ) { up = new FileUpload( new org.uberfire.mvp.Command() { @Override public void execute() { uploadButtonClickHanlder.onClick( null ); } }, addFileUpload ); up.setName( FileManagerFields.UPLOAD_F...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setup"
"private void setup( boolean addFileUpload ) { up = new FileUpload( new org.uberfire.mvp.Command() { @Override public void execute() { uploadButtonClickHanlder.onClick( null ); } }, addFileUpload ); up.setName( FileManagerFields.UPLOAD_F...
Inversion-Mutation
megadiff
"@Override public void onSubmitComplete( final Form.SubmitCompleteEvent event ) { if ( "OK".equalsIgnoreCase( event.getResults() ) ) { executeCallback( successCallback ); Window.alert( CommonConstants.INSTANCE.UploadSuccess() ); }...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onSubmitComplete"
"@Override public void onSubmitComplete( final Form.SubmitCompleteEvent event ) { <MASK>reset();</MASK> if ( "OK".equalsIgnoreCase( event.getResults() ) ) { executeCallback( successCallback ); Window.alert( CommonConstants.INSTANCE...
Inversion-Mutation
megadiff
"protected WebSocketHandler postProcessMapping(WebSocket webSocket, AtmosphereRequest request, WebSocketHandler w) { if (!wildcardMapping()) return w; String path; String pathInfo = null; try { pathInfo = request.getPathInfo(); } catch (IllegalStateException...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "postProcessMapping"
"protected WebSocketHandler postProcessMapping(WebSocket webSocket, AtmosphereRequest request, WebSocketHandler w) { if (!wildcardMapping()) return w; String path; String pathInfo = null; try { pathInfo = request.getPathInfo(); } catch (IllegalStateException...
Inversion-Mutation
megadiff
"protected List<Customer> findCustomersFromDB() { try { List<Customer> customers = new ArrayList<Customer>(); List<Customer> customersInDb = mongoOperation.getCollection(CUSTOMERDAO_COLLECTION_NAME, Customer.class); if (CollectionUtils.isNotEmpty(customersInDb)) { for (Customer custo...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "findCustomersFromDB"
"protected List<Customer> findCustomersFromDB() { try { List<Customer> customers = new ArrayList<Customer>(); <MASK>List<String> applicableTechnologies = new ArrayList<String>();</MASK> List<Customer> customersInDb = mongoOperation.getCollection(CUSTOMERDAO_COLLECTION_NAME, Customer.class); ...
Inversion-Mutation
megadiff
"@Override protected Iterable<Class<? extends Filter>> dependencies() { List<Class<? extends Filter>> dependencies = new ArrayList<Class<? extends Filter>>(); dependencies.add(SourceFilter.class); dependencies.add(StandardFilter.class); dependencies.add(ResetFilter.class); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "dependencies"
"@Override protected Iterable<Class<? extends Filter>> dependencies() { List<Class<? extends Filter>> dependencies = new ArrayList<Class<? extends Filter>>(); dependencies.add(SourceFilter.class); <MASK>dependencies.add(ResetFilter.class);</MASK> dependencies.add(StandardFilter....
Inversion-Mutation
megadiff
"@Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { UserService service = UserServiceFactory.getUserService(); User user = service.getCurrentUser(); if (user != null) { String teamName = req.getParameter("teamName"); RequestDisp...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doGet"
"@Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { UserService service = UserServiceFactory.getUserService(); User user = service.getCurrentUser(); if (user != null) { String teamName = req.getParameter("teamName"); RequestDisp...
Inversion-Mutation
megadiff
"@RequestMapping("/entity-details") public String entityDetails(HttpServletRequest request) throws StorageException { String view = request.getParameter("vt"); if (!"graph".equalsIgnoreCase(view)) view = "list"; request.setAttribute("view", view); RequestUtils.params2attributes(request, "vt", ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "entityDetails"
"@RequestMapping("/entity-details") public String entityDetails(HttpServletRequest request) throws StorageException { String view = request.getParameter("vt"); if (!"graph".equalsIgnoreCase(view)) view = "list"; request.setAttribute("view", view); RequestUtils.params2attributes(request, "vt", ...
Inversion-Mutation
megadiff
"public void instantiate(DataInputStream in) throws Exception { d_x1 = in.readFloat(); d_y1 = in.readFloat(); d_x2 = in.readFloat(); d_y2 = in.readFloat(); d_id = in.readInt(); d_transparency = in.readInt(); if(d_id == GameActivity.getInstance().model().player().id()) { d_transparency =...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "instantiate"
"public void instantiate(DataInputStream in) throws Exception { d_x1 = in.readFloat(); d_y1 = in.readFloat(); d_x2 = in.readFloat(); d_y2 = in.readFloat(); d_id = in.readInt(); if(d_id == GameActivity.getInstance().model().player().id()) { d_transparency = 0; } else { <MASK>d_trans...
Inversion-Mutation
megadiff
"protected int readComment(char c) throws IOException { ISourcePosition startPosition = src.getPosition(); tokenBuffer.setLength(0); tokenBuffer.append(c); // FIXME: Consider making a better LexerSource.readLine while ((c = src.read()) != '\n') { if (c == EOF...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "readComment"
"protected int readComment(char c) throws IOException { ISourcePosition startPosition = src.getPosition(); tokenBuffer.setLength(0); <MASK>tokenBuffer.append(c);</MASK> // FIXME: Consider making a better LexerSource.readLine while ((c = src.read()) != '\n') { ...
Inversion-Mutation
megadiff
"public void setValue(IValueReference value) { IValue val = createValue(); if (val != null) { if (value != null) { IValue src = ((IValueProvider) value).getValue(); if (src == null) return; val.clear(); if (src instanceof Value && ((IValueProvider) value).isReference()) { ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setValue"
"public void setValue(IValueReference value) { IValue val = createValue(); if (val != null) { <MASK>val.clear();</MASK> if (value != null) { IValue src = ((IValueProvider) value).getValue(); if (src == null) return; if (src instanceof Value && ((IValueProvider) value).isRefere...
Inversion-Mutation
megadiff
"public void exportXML(final java.io.Writer writer, final String indent, final Object any) throws Exception { final StringBuffer sb_body = new StringBuffer(); sb_body.append(indent).append("<t2_layer_set\n"); final String in = indent + "\t"; super.exportXML(sb_body, in, any); sb_body.append(in).append("l...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "exportXML"
"public void exportXML(final java.io.Writer writer, final String indent, final Object any) throws Exception { final StringBuffer sb_body = new StringBuffer(); sb_body.append(indent).append("<t2_layer_set\n"); final String in = indent + "\t"; super.exportXML(sb_body, in, any); sb_body.append(in).append("l...
Inversion-Mutation
megadiff
"void doAutoFocus(){ if(mCamera != null && mFocus != null){ mCamera.setPreviewCallback(null); try{ mCamera.autoFocus(mFocus); }catch(Exception e){ mPreviewCallback = new PreviewCallback(CameraPreview.this); } } }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doAutoFocus"
"void doAutoFocus(){ <MASK>mCamera.setPreviewCallback(null);</MASK> if(mCamera != null && mFocus != null){ try{ mCamera.autoFocus(mFocus); }catch(Exception e){ mPreviewCallback = new PreviewCallback(CameraPreview.this); } } }"
Inversion-Mutation
megadiff
"public void saveUserAddons(ISdkLog log) { FileOutputStream fos = null; try { String folder = AndroidLocation.getFolder(); File f = new File(folder, SRC_FILENAME); fos = new FileOutputStream(f); Properties props = new Properties(); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "saveUserAddons"
"public void saveUserAddons(ISdkLog log) { FileOutputStream fos = null; try { String folder = AndroidLocation.getFolder(); File f = new File(folder, SRC_FILENAME); fos = new FileOutputStream(f); Properties props = new Properties(); ...
Inversion-Mutation
megadiff
"public void addProps(MarkerAnnotationAndPosition marker, IAnalysisPreferences analysisPreferences, final String line, final PySelection ps, int offset, IPythonNature nature, final PyEdit edit, List<ICompletionProposal> props) throws BadLocationException, CoreException { ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "addProps"
"public void addProps(MarkerAnnotationAndPosition marker, IAnalysisPreferences analysisPreferences, final String line, final PySelection ps, int offset, IPythonNature nature, final PyEdit edit, List<ICompletionProposal> props) throws BadLocationException, CoreException { ...
Inversion-Mutation
megadiff
"@Override public void apply(IDocument document) { FastStringBuffer strToAdd = new FastStringBuffer(messageToIgnore, 5); int lineLen = line.length(); int endLineIndex = ps.getEndLineOffset(); boolean isComment = ParsingUtils.isCommentPar...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "apply"
"@Override public void apply(IDocument document) { FastStringBuffer strToAdd = new FastStringBuffer(messageToIgnore, 5); int lineLen = line.length(); int endLineIndex = ps.getEndLineOffset(); boolean isComment = ParsingUtils.isCommentPar...
Inversion-Mutation
megadiff
"private void processTagStart(XmlPullParser parser, boolean isempty) { if (justended) { // avoid the pathological case where we have for example // <td class="tmiblock1" rsf:id="tmiblock:"></td><td> which makes it // hard to spot run ends on the basis of recursion uncession. justended =...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "processTagStart"
"private void processTagStart(XmlPullParser parser, boolean isempty) { if (justended) { // avoid the pathological case where we have for example // <td class="tmiblock1" rsf:id="tmiblock:"></td><td> which makes it // hard to spot run ends on the basis of recursion uncession. justended =...
Inversion-Mutation
megadiff
"@Override protected void tearDown() throws Exception { authorizationServiceReg.unregister(); super.tearDown(); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "tearDown"
"@Override protected void tearDown() throws Exception { <MASK>super.tearDown();</MASK> authorizationServiceReg.unregister(); }"
Inversion-Mutation
megadiff
"public void dispose() { super.dispose(); htmlViewCombo.dispose(); xmlViewCombo.dispose(); editor.dispose(); rolesTable.dispose(); addRowButton.dispose(); removeRowButton.dispose(); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "dispose"
"public void dispose() { super.dispose(); htmlViewCombo.dispose(); xmlViewCombo.dispose(); <MASK>rolesTable.dispose();</MASK> editor.dispose(); addRowButton.dispose(); removeRowButton.dispose(); }"
Inversion-Mutation
megadiff
"@Timed public List<Bookmark> findAll() { final List<Order> orders = new ArrayList<>(); orders.add(new Order(Direction.DESC, "creationDate")); orders.add(new Order(Direction.DESC, "modificationDate")); return Lists.newArrayList(bookmarkRepository.findAll(new Sort(orders))); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "findAll"
"@Timed public List<Bookmark> findAll() { final List<Order> orders = new ArrayList<>(); <MASK>orders.add(new Order(Direction.DESC, "modificationDate"));</MASK> orders.add(new Order(Direction.DESC, "creationDate")); return Lists.newArrayList(bookmarkRepository.findAll(new Sort...
Inversion-Mutation
megadiff
"private void deleteDigitalObject(Connection connection, String pid) throws SQLException { logFinest("Entered DefaultDOReplicator.deleteDigitalObject"); Statement st=null; Statement st2=null; ResultSet results=null; try { st=connection.createStatement();...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "deleteDigitalObject"
"private void deleteDigitalObject(Connection connection, String pid) throws SQLException { logFinest("Entered DefaultDOReplicator.deleteDigitalObject"); Statement st=null; Statement st2=null; ResultSet results=null; try { st=connection.createStatement();...
Inversion-Mutation
megadiff
"public boolean isThisType(RandomAccessInputStream stream) throws IOException { TiffParser tp = new TiffParser(stream); IFD ifd = tp.getFirstIFD(); if (ifd == null) return false; String com = ifd.getComment(); if (com == null) com = ""; return com.indexOf(FLUOVIEW_MAGIC_STRING) != -1 && ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "isThisType"
"public boolean isThisType(RandomAccessInputStream stream) throws IOException { TiffParser tp = new TiffParser(stream); IFD ifd = tp.getFirstIFD(); String com = ifd.getComment(); if (com == null) com = ""; <MASK>if (ifd == null) return false;</MASK> return com.indexOf(FLUOVIEW_MAGIC_STRIN...
Inversion-Mutation
megadiff
"public Gson create() { List<TypeAdapter.Factory> factories = new ArrayList<TypeAdapter.Factory>(); factories.addAll(this.factories); Collections.reverse(factories); factories.addAll(this.hierarchyFactories); addTypeAdaptersForDate(datePattern, dateStyle, timeStyle, factories); return n...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "create"
"public Gson create() { List<TypeAdapter.Factory> factories = new ArrayList<TypeAdapter.Factory>(); <MASK>factories.addAll(this.hierarchyFactories);</MASK> factories.addAll(this.factories); Collections.reverse(factories); addTypeAdaptersForDate(datePattern, dateStyle, timeStyle, factories); ...
Inversion-Mutation
megadiff
"public static void main(String[] args) throws SQLException { // BlockingQueue receives all client messages, allows reads only when non-empty, and supports threads final BlockingQueue<Message> inMessages = new LinkedBlockingQueue<Message>(); final BlockingQueue<Message> outMessages = new LinkedBlockingQueu...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "main"
"public static void main(String[] args) throws SQLException { // BlockingQueue receives all client messages, allows reads only when non-empty, and supports threads final BlockingQueue<Message> inMessages = new LinkedBlockingQueue<Message>(); final BlockingQueue<Message> outMessages = new LinkedBlockingQueu...
Inversion-Mutation
megadiff
"public synchronized int read(byte[] b, int off, int len) throws IOException { if (buf == null) throw new IOException("Stream is closed"); if (off < 0 || len < 0 || off+len > b.length) throw new ArrayIndexOutOfBoundsException(); if (len == 0) return 0; if (pos == buf.length) return -1; int reallen ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "read"
"public synchronized int read(byte[] b, int off, int len) throws IOException { if (buf == null) throw new IOException("Stream is closed"); <MASK>if (pos == buf.length) return -1;</MASK> if (off < 0 || len < 0 || off+len > b.length) throw new ArrayIndexOutOfBoundsException(); if (len == 0) return 0; ...
Inversion-Mutation
megadiff
"private void publish(RemoteServiceDescription rsd) { synchronized (rsDescs) { ServiceHooksProxy handler = new ServiceHooksProxy(rsd.getService()); Object service = Proxy.newProxyInstance(rsd.getServiceInterfaceClass().getClassLoader(), new Class[] { rsd .getServiceInterfaceClass() }, handler); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "publish"
"private void publish(RemoteServiceDescription rsd) { synchronized (rsDescs) { ServiceHooksProxy handler = new ServiceHooksProxy(rsd.getService()); Object service = Proxy.newProxyInstance(rsd.getServiceInterfaceClass().getClassLoader(), new Class[] { rsd .getServiceInterfaceClass() }, handler); <...
Inversion-Mutation
megadiff
"private void handleToogleClick(Object source) { ToggleButton button = (ToggleButton) source; ToggleButton btn = null; JobStep step = null; for (int i = 0; i < stepBtns.size(); i++) { btn = stepBtns.get(i); if (btn.getText().equals(button.getText())) { btn.setDown(true); updateStep(i); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "handleToogleClick"
"private void handleToogleClick(Object source) { ToggleButton button = (ToggleButton) source; ToggleButton btn = null; JobStep step = null; for (int i = 0; i < stepBtns.size(); i++) { btn = stepBtns.get(i); if (btn.getText().equals(button.getText())) { btn.setDown(true); updateStep(i); ...
Inversion-Mutation
megadiff
"@Override public void close() { commitLock.writeLock().lock(); try { if(closeInProgress) return; checkState(); closeInProgress = true; //notify background threads itemsQueue.put(new CountDownLatch(0)); super.delete(ne...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "close"
"@Override public void close() { commitLock.writeLock().lock(); try { <MASK>checkState();</MASK> if(closeInProgress) return; closeInProgress = true; //notify background threads itemsQueue.put(new CountDownLatch(0)); su...
Inversion-Mutation
megadiff
"@Override protected LinkedList<ItemDetailsMetadata> defineMetadatas(final IFlowNodeItem task) { final MetadataTaskBuilder metadatas = new MetadataTaskBuilder(); metadatas.addAppsName(); metadatas.addAppsVersion(); metadatas.addCaseId(task, true); metadatas.addType(); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "defineMetadatas"
"@Override protected LinkedList<ItemDetailsMetadata> defineMetadatas(final IFlowNodeItem task) { final MetadataTaskBuilder metadatas = new MetadataTaskBuilder(); <MASK>metadatas.addCaseId(task, true);</MASK> metadatas.addAppsName(); metadatas.addAppsVersion(); metadata...
Inversion-Mutation
megadiff
"public final void setText(String message) { if (!this.minecraft.running) { throw new StopGameException(); } else { text = message; passServerCommand(message); if (this.minecraft.session == null) { HackState.setAllEnabled(); return; } String joinedString = new StringBuilder(...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setText"
"public final void setText(String message) { if (!this.minecraft.running) { throw new StopGameException(); } else { <MASK>passServerCommand(message);</MASK> text = message; if (this.minecraft.session == null) { HackState.setAllEnabled(); return; } String joinedString = new S...
Inversion-Mutation
megadiff
"private BundleInfo findBundle(final String target, String version, boolean removeMatch) { ArrayList matches = (ArrayList) allBundles.get(target); int numberOfMatches = matches != null ? matches.size() : 0; if (numberOfMatches == 1) { //TODO Need to check the version return (BundleInfo) (removeMatch ? ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "findBundle"
"private BundleInfo findBundle(final String target, String version, boolean removeMatch) { ArrayList matches = (ArrayList) allBundles.get(target); int numberOfMatches = matches != null ? matches.size() : 0; if (numberOfMatches == 1) { //TODO Need to check the version return (BundleInfo) (removeMatch ? ...
Inversion-Mutation
megadiff
"void allocate() { edenLock.lock(); try { MemoryBlock mb = factory.getBlock(); mb.setCreatedID(youngGcCount); allocMax = mb.getBlockId(); allocList[allocMax] = mb; // FIXME Single allocating thread for (int i = 0; i < ed...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "allocate"
"void allocate() { edenLock.lock(); try { MemoryBlock mb = factory.getBlock(); allocMax = mb.getBlockId(); allocList[allocMax] = mb; // FIXME Single allocating thread for (int i = 0; i < eden.width(); i++) { // Must...
Inversion-Mutation
megadiff
"public Object executeProgram(String main, IValue[] args) { // Finalize the instruction generation of all functions for (Function f : functionStore) { f.finalize(functionMap, constructorMap, listing); } // Search for the "#module_init" function and check arguments Function init_function = fun...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "executeProgram"
"public Object executeProgram(String main, IValue[] args) { // Finalize the instruction generation of all functions for (Function f : functionStore) { f.finalize(functionMap, constructorMap, listing); } // Search for the "#module_init" function and check arguments Function init_function = fun...
Inversion-Mutation
megadiff
"public void updateAlarm( Alarm alarm, AlarmEvent evt ) throws PersistenceException { OrmHelper helper = this.getHelper(); // First handle any updates to foreign fields that are set directly in Alarm. switch ( evt.getModifiedField() ) { case AUDIO_SOURCE: PersistenceExceptionDao<AudioSource, Integer> ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "updateAlarm"
"public void updateAlarm( Alarm alarm, AlarmEvent evt ) throws PersistenceException { OrmHelper helper = this.getHelper(); // First handle any updates to foreign fields that are set directly in Alarm. switch ( evt.getModifiedField() ) { case AUDIO_SOURCE: PersistenceExceptionDao<AudioSource, Integer> ...
Inversion-Mutation
megadiff
"public void mouseClicked(MouseEvent me) { resetHideCounter(); synchronized(hotZones) { for (HotZone hz : hotZones) { if (hz.zone.contains(me.getPoint())) { if (hz.operation == HotZone.ops.INC) { hz.player.updateVP(+1); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "mouseClicked"
"public void mouseClicked(MouseEvent me) { synchronized(hotZones) { <MASK>resetHideCounter();</MASK> for (HotZone hz : hotZones) { if (hz.zone.contains(me.getPoint())) { if (hz.operation == HotZone.ops.INC) { hz.player.up...
Inversion-Mutation
megadiff
"static public void loadDataAndPrepareJob( HttpServletRequest request, HttpServletResponse response, Properties parameters, final ImportingJob job, JSONObject config) throws IOException, ServletException { JSONObject retrievalRecord = new JSONObject(); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "loadDataAndPrepareJob"
"static public void loadDataAndPrepareJob( HttpServletRequest request, HttpServletResponse response, Properties parameters, final ImportingJob job, JSONObject config) throws IOException, ServletException { JSONObject retrievalRecord = new JSONObject(); ...
Inversion-Mutation
megadiff
"@Override public void encodeBegin(FacesContext context, UIComponent component) throws IOException { ResponseWriter writer = context.getResponseWriter(); Page page = (Page) component; UIComponent config = page.getFacet("config"); UIComponent preinit = page.getFacet("prei...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "encodeBegin"
"@Override public void encodeBegin(FacesContext context, UIComponent component) throws IOException { ResponseWriter writer = context.getResponseWriter(); Page page = (Page) component; UIComponent config = page.getFacet("config"); UIComponent preinit = page.getFacet("prei...
Inversion-Mutation
megadiff
"Postfix(String formula, FormulaManager fm) throws FormulaException { // convert expression to postfix notation String[] postfix = null; int[] pfixcode = null; String infix; // convert string to char array char[] charStr = formula.toCharArray(); // remove spaces and check parenthe...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "Postfix"
"Postfix(String formula, FormulaManager fm) throws FormulaException { // convert expression to postfix notation String[] postfix = null; int[] pfixcode = null; String infix; // convert string to char array char[] charStr = formula.toCharArray(); // remove spaces and check parenthe...
Inversion-Mutation
megadiff
"public SVDBClockingEventExpr clocking_event() throws SVParseException { SVDBClockingEventExpr expr = new SVDBClockingEventExpr(); fLexer.readOperator("@"); // Check if there is an open brace - kill it if so if (fLexer.peekOperator("(")) { SVDBParenExpr p = new SVDBParenExpr(); p.setLocation(fLexer....
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "clocking_event"
"public SVDBClockingEventExpr clocking_event() throws SVParseException { SVDBClockingEventExpr expr = new SVDBClockingEventExpr(); fLexer.readOperator("@"); // Check if there is an open brace - kill it if so if (fLexer.peekOperator("(")) { SVDBParenExpr p = new SVDBParenExpr(); p.setLocation(fLexer....
Inversion-Mutation
megadiff
"private void initializeIndex(){ StandardAnalyzer analyzer=new StandardAnalyzer(Version.LUCENE_36); try { index=FSDirectory.open(new File(indexLocation)); reader = IndexReader.open(index); IndexWriterConfig indexWriterConfig=new IndexWriterConfig(Version.LUCENE_36, new StandardAnalyzer(Version.LUCENE_...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "initializeIndex"
"private void initializeIndex(){ StandardAnalyzer analyzer=new StandardAnalyzer(Version.LUCENE_36); try { index=FSDirectory.open(new File(indexLocation)); IndexWriterConfig indexWriterConfig=new IndexWriterConfig(Version.LUCENE_36, new StandardAnalyzer(Version.LUCENE_36)); writer = new IndexWriter(in...
Inversion-Mutation
megadiff
"public void Bid(Player bidder, String[] inputArgs) { AuctionBid bid = new AuctionBid(this, bidder, inputArgs); if (bid.getError() != null) { failBid(bid, bid.getError()); return; } if (owner.equals(bidder)) { failBid(bid, "bid-fail-is-auction-owner"); return; } if (currentBid == null...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "Bid"
"public void Bid(Player bidder, String[] inputArgs) { AuctionBid bid = new AuctionBid(this, bidder, inputArgs); <MASK>Integer previousBidAmount = currentBid.getBidAmount();</MASK> if (bid.getError() != null) { failBid(bid, bid.getError()); return; } if (owner.equals(bidder)) { failBid(bid, "b...
Inversion-Mutation
megadiff
"public static void createDBObjects () { /* Transponder Code = 1 */ Route debugRoute = Route.ParseRouteByTaxiways((new Waypoint(new LatLng(41.7258, -71.4368), false, false)), ""); debugRoute.addWaypoints(Arrays.asList( new Waypoint(new LatLng(41.7258, -71.4368), false, false), new Waypoint(new LatLng...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createDBObjects"
"public static void createDBObjects () { /* Transponder Code = 1 */ Route debugRoute = Route.ParseRouteByTaxiways((new Waypoint(new LatLng(41.7258, -71.4368), false, false)), ""); debugRoute.addWaypoints(Arrays.asList( new Waypoint(new LatLng(41.7258, -71.4368), false, false), new Waypoint(new LatLng...
Inversion-Mutation
megadiff
"public boolean isBaseLevelForKey(Slice userKey) { // Maybe use binary search to find right entry instead of linear search? UserComparator userComparator = inputVersion.getInternalKeyComparator().getUserComparator(); for (int level = this.level + 2; level < NUM_LEVELS; level++) { ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "isBaseLevelForKey"
"public boolean isBaseLevelForKey(Slice userKey) { // Maybe use binary search to find right entry instead of linear search? UserComparator userComparator = inputVersion.getInternalKeyComparator().getUserComparator(); for (int level = this.level + 2; level < NUM_LEVELS; level++) { ...
Inversion-Mutation
megadiff
"public static void main(String[] args) { Grid g = new Grid(); GameDisplay display = new GameDisplay(g); long s = System.currentTimeMillis(); while ((s - System.currentTimeMillis()) < 0){ if ((System.currentTimeMillis() - s) >= 1000){ display.redraw(g); s = System.currentTimeMillis(); } ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "main"
"public static void main(String[] args) { Grid g = new Grid(); GameDisplay display = new GameDisplay(g); long <MASK>s = System.currentTimeMillis();</MASK> while ((s - System.currentTimeMillis()) < 0){ <MASK>s = System.currentTimeMillis();</MASK> if ((System.currentTimeMillis() - s) >= 1000){ di...
Inversion-Mutation
megadiff
"public void clearCache() { String[] principalNames; synchronized (m_storeLock) { principalNames = m_store.keySet().toArray(new String[m_store.size()]); } // notify with a filter, that will be accepted nowhere SERVICES.getService(IClientNotificationService.class).putNotification(new Res...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "clearCache"
"public void clearCache() { String[] principalNames; synchronized (m_storeLock) { principalNames = m_store.keySet().toArray(new String[m_store.size()]); } <MASK>clearCacheOfPrincipals(principalNames);</MASK> // notify with a filter, that will be accepted nowhere SERVICES.getService(...
Inversion-Mutation
megadiff
"public Database(Client client_, String name_) throws SDBPException { client = client_; name = name_; BigInteger bi = scaliendb_client.SDBP_GetDatabaseID(client.getPtr(), name); databaseID = bi.longValue(); if (databaseID == 0) throw new SDBPException(Status.toS...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "Database"
"public Database(Client client_, String name_) throws SDBPException { client = client_; BigInteger bi = scaliendb_client.SDBP_GetDatabaseID(client.getPtr(), name); databaseID = bi.longValue(); if (databaseID == 0) throw new SDBPException(Status.toString(Status.SDBP_BADS...
Inversion-Mutation
megadiff
"public void processGetRequest(HTTPRequest request){ js = request.isParameterSet("js"); showold = request.isParameterSet("showold"); groupusk = request.isParameterSet("groupusk"); if (request.isParameterSet("request") && Search.hasSearch(request.getIntParam("request"))){ search = Search.getSearch(requ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "processGetRequest"
"public void processGetRequest(HTTPRequest request){ js = request.isParameterSet("js"); showold = request.isParameterSet("showold"); groupusk = request.isParameterSet("groupusk"); if (request.isParameterSet("request") && Search.hasSearch(request.getIntParam("request"))){ search = Search.getSearch(requ...