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 onCreate() { mConnectivityManager = new EmailConnectivityManager(this, TAG); // Start up our service thread new Thread(this, "AttachmentDownloadService").start(); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onCreate"
"@Override public void onCreate() { // Start up our service thread new Thread(this, "AttachmentDownloadService").start(); <MASK>mConnectivityManager = new EmailConnectivityManager(this, TAG);</MASK> }"
Inversion-Mutation
megadiff
"public long finish() throws IOException { obj_in.clear(); long cnt = super.finish(); return cnt; }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "finish"
"public long finish() throws IOException { <MASK>long cnt = super.finish();</MASK> obj_in.clear(); return cnt; }"
Inversion-Mutation
megadiff
"public void processTimeout(final TimeoutEvent timeoutEvent) { Transaction eventTransaction = null; if(timeoutEvent.isServerTransaction()) { eventTransaction = timeoutEvent.getServerTransaction(); } else { eventTransaction = timeoutEvent.getClientTransaction(); } final Transaction transaction = e...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "processTimeout"
"public void processTimeout(final TimeoutEvent timeoutEvent) { Transaction eventTransaction = null; if(timeoutEvent.isServerTransaction()) { eventTransaction = timeoutEvent.getServerTransaction(); } else { eventTransaction = timeoutEvent.getClientTransaction(); } final Transaction transaction = e...
Inversion-Mutation
megadiff
"public void run() { try { SipServletMessageImpl sipServletMessage = tad.getSipServletMessage(); SipSessionKey sipSessionKey = sipServletMessage.getSipSessionKey(); MobicentsSipSession sipSession = sipServletMessage.getSipSession(); boolean appNotifiedOfPrackNotReceived = false; ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run"
"public void run() { try { SipServletMessageImpl sipServletMessage = tad.getSipServletMessage(); SipSessionKey sipSessionKey = sipServletMessage.getSipSessionKey(); MobicentsSipSession sipSession = sipServletMessage.getSipSession(); boolean appNotifiedOfPrackNotReceived = false; ...
Inversion-Mutation
megadiff
"private SpoutChunk setChunk(SpoutChunk newChunk, int x, int y, int z, ChunkDataForRegion dataForRegion, boolean generated, LoadOption loadopt) { final AtomicReference<SpoutChunk> chunkReference = chunks[x][y][z]; while (true) { if (chunkReference.compareAndSet(null, newChunk)) { newChunk.notifyColumn();...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setChunk"
"private SpoutChunk setChunk(SpoutChunk newChunk, int x, int y, int z, ChunkDataForRegion dataForRegion, boolean generated, LoadOption loadopt) { final AtomicReference<SpoutChunk> chunkReference = chunks[x][y][z]; while (true) { if (chunkReference.compareAndSet(null, newChunk)) { newChunk.notifyColumn();...
Inversion-Mutation
megadiff
"public void handleCollisionMessage(CollisionServerMessage message) { int bulletID = message.mBulletID; int shipID = message.mShipID; if (shipID != this.mID) { Body bulletBody = this.mBullets.get(bulletID); // delete the bullet if it exists if (bulletBody != null) { bulletBody.setUser...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "handleCollisionMessage"
"public void handleCollisionMessage(CollisionServerMessage message) { int bulletID = message.mBulletID; int shipID = message.mShipID; if (shipID != this.mID) { Body bulletBody = this.mBullets.get(bulletID); // delete the bullet if it exists if (bulletBody != null) { bulletBody.setUser...
Inversion-Mutation
megadiff
"protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); PrintWriter out = response.getWriter(); try { prefixHTML(out); /* ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "processRequest"
"protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); PrintWriter out = response.getWriter(); try { prefixHTML(out); /* ...
Inversion-Mutation
megadiff
"public Groundplan getOptimalSolution(int maxiter){ double currentvalue,nextvalue; for(int i=0;i<=maxiter;i++) { springembedding.springEmbed(currentplan.getVertices()); //bereken startCurrentValue en startNextValue (deze zijn nodig voor berekenen T) currentvalue=currentplan.getGroundpl...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getOptimalSolution"
"public Groundplan getOptimalSolution(int maxiter){ double currentvalue,nextvalue; for(int i=0;i<=maxiter;i++) { springembedding.springEmbed(currentplan.getVertices()); //bereken startCurrentValue en startNextValue (deze zijn nodig voor berekenen T) currentvalue=currentplan.getGroundpl...
Inversion-Mutation
megadiff
"@Override protected void retrieveContainedJComponentsAndConstraints() { if (placeholders == null) { placeholders = new Vector<PlaceHolder>(); } placeholders.removeAllElements(); super.retrieveContainedJComponentsAndConstraints(); if (!getComponent().getProtectContent()) { // FlowLayout ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "retrieveContainedJComponentsAndConstraints"
"@Override protected void retrieveContainedJComponentsAndConstraints() { if (placeholders == null) { placeholders = new Vector<PlaceHolder>(); } placeholders.removeAllElements(); super.retrieveContainedJComponentsAndConstraints(); if (!getComponent().getProtectContent()) { // FlowLayout ...
Inversion-Mutation
megadiff
"@Override public void insertComponent(FIBComponent newComponent) { FIBEditablePanelView.this.getComponent().addToSubComponents(new FIBLabel("<right>"), beginRightPlaceHolderConstraints, 0); FIBEditablePanelView.this.getComponent().addToSubComponents(newComponent, beginLeftPlaceHolderConst...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "insertComponent"
"@Override public void insertComponent(FIBComponent newComponent) { <MASK>FIBEditablePanelView.this.getComponent().addToSubComponents(newComponent, beginLeftPlaceHolderConstraints, 0);</MASK> FIBEditablePanelView.this.getComponent().addToSubComponents(new FIBLabel("<right>"), beginRightPlac...
Inversion-Mutation
megadiff
"private static int init() { SessionManager.generateTestSessionFactory(); ModelAccessor.initialize(new Model()); return 0; }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "init"
"private static int init() { <MASK>ModelAccessor.initialize(new Model());</MASK> SessionManager.generateTestSessionFactory(); return 0; }"
Inversion-Mutation
megadiff
"@Override protected void onPause() { super.onPause(); updateModel(); try { String action = getIntent().getAction(); if (Intent.ACTION_INSERT.equals(action)) { Uri uri = getContentResolver().insert(DB.CpuProfile.CONTENT_URI, cpu.getValues()); long id = ContentUris.parseId(uri); if (id ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onPause"
"@Override protected void onPause() { updateModel(); try { String action = getIntent().getAction(); if (Intent.ACTION_INSERT.equals(action)) { Uri uri = getContentResolver().insert(DB.CpuProfile.CONTENT_URI, cpu.getValues()); long id = ContentUris.parseId(uri); if (id > 0) { cpu.se...
Inversion-Mutation
megadiff
"public Lists(Sink.Images images) { combo.setVisibleItemCount(1); combo.addChangeListener(this); list.setVisibleItemCount(10); list.setMultipleSelect(true); for (int i = 0; i < stringLists.length; ++i) { combo.addItem("List " + i); } combo.setSelectedIndex(0); fillList(0...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "Lists"
"public Lists(Sink.Images images) { combo.setVisibleItemCount(1); combo.addChangeListener(this); list.setVisibleItemCount(10); list.setMultipleSelect(true); for (int i = 0; i < stringLists.length; ++i) { combo.addItem("List " + i); } combo.setSelectedIndex(0); fillList(0...
Inversion-Mutation
megadiff
"public MediaTypeHandler( HttpServletRequest request, HttpServletResponse response ) { String acceptHeader = request.getHeader("Accept"); String contentTypeHeader = request.getHeader("Content-Type"); // accept defaults to JSON accept = APPLICATION_JSON; if ( acceptHeader != ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "MediaTypeHandler"
"public MediaTypeHandler( HttpServletRequest request, HttpServletResponse response ) { String acceptHeader = request.getHeader("Accept"); String contentTypeHeader = request.getHeader("Content-Type"); // accept defaults to JSON if ( acceptHeader != null ) { <MASK>accept ...
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 synchronized void setOnline(boolean isOnline) throws IOException { // if mode really changed if (online != isOnline) { // switching to ONLINE if (isOnline) { log.info("Setting index back online"); offlineIndex.commit(true); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setOnline"
"public synchronized void setOnline(boolean isOnline) throws IOException { // if mode really changed if (online != isOnline) { // switching to ONLINE if (isOnline) { log.info("Setting index back online"); offlineIndex.commit(true); ...
Inversion-Mutation
megadiff
"public static void main(String[] args) { try { String options[] = { "config:", "help", "loop", "port:", "remote:", "user:", "verbose", "version", ...
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) { try { String options[] = { "config:", "help", "loop", "port:", "remote:", "user:", "verbose", "version", ...
Inversion-Mutation
megadiff
"Augmentations handleEndElement(QName element, Augmentations augs) { if (DEBUG) { System.out.println("==>handleEndElement:" +element); } // if we are skipping, return if (fSkipValidationDepth >= 0) { // but if this is the top element that we are skipping, ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "handleEndElement"
"Augmentations handleEndElement(QName element, Augmentations augs) { if (DEBUG) { System.out.println("==>handleEndElement:" +element); } // if we are skipping, return if (fSkipValidationDepth >= 0) { // but if this is the top element that we are skipping, ...
Inversion-Mutation
megadiff
"public void run() { try { // Read input BufferedInputStream is = new BufferedInputStream(connection.getInputStream()); InputStreamReader isr = new InputStreamReader(is); int character; StringBuffer process = new StringBuffer(); while((character = isr.read()) != '\n') { process.append((c...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run"
"public void run() { try { // Read input BufferedInputStream is = new BufferedInputStream(connection.getInputStream()); InputStreamReader isr = new InputStreamReader(is); int character; StringBuffer process = new StringBuffer(); while((character = isr.read()) != '\n') { process.append((c...
Inversion-Mutation
megadiff
"public MiscDisguise(DisguiseType disguiseType, boolean replaceSounds, int id, int data) { createDisguise(disguiseType, replaceSounds); switch (disguiseType) { // The only disguises which should use a custom data. case FISHING_HOOK: case ARROW: case SPLASH_POTION: ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "MiscDisguise"
"public MiscDisguise(DisguiseType disguiseType, boolean replaceSounds, int id, int data) { switch (disguiseType) { // The only disguises which should use a custom data. case FISHING_HOOK: case ARROW: case SPLASH_POTION: case SMALL_FIREBALL: case FIREBALL: ...
Inversion-Mutation
megadiff
"public void ensureOutOfSync(final IFile file) { modifyInFileSystem(file); touchInFilesystem(file); assertTrue("File not out of sync: " + file.getLocation().toOSString(), file.getLocation().toFile().lastModified() != file.getLocalTimeStamp()); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "ensureOutOfSync"
"public void ensureOutOfSync(final IFile file) { <MASK>touchInFilesystem(file);</MASK> modifyInFileSystem(file); assertTrue("File not out of sync: " + file.getLocation().toOSString(), file.getLocation().toFile().lastModified() != file.getLocalTimeStamp()); }"
Inversion-Mutation
megadiff
"public synchronized void setMetadata(T subject, String metadataKey, MetadataValue newMetadataValue) { Validate.notNull(newMetadataValue, "Value cannot be null"); Plugin owningPlugin = newMetadataValue.getOwningPlugin(); Validate.notNull(owningPlugin, "Plugin cannot be null"); Strin...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setMetadata"
"public synchronized void setMetadata(T subject, String metadataKey, MetadataValue newMetadataValue) { <MASK>Plugin owningPlugin = newMetadataValue.getOwningPlugin();</MASK> Validate.notNull(newMetadataValue, "Value cannot be null"); Validate.notNull(owningPlugin, "Plugin cannot be null"); ...
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
"protected JComponent createToolbar() { _toolbar = new FolderToolBar(true, _folderChooser.getRecentList()); _folderToolbarListener = new FolderToolBarListener() { // ------------------------------------------------------------------------------ // Implementation of FolderTool...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createToolbar"
"protected JComponent createToolbar() { _toolbar = new FolderToolBar(true, _folderChooser.getRecentList()); _folderToolbarListener = new FolderToolBarListener() { // ------------------------------------------------------------------------------ // Implementation of FolderTool...
Inversion-Mutation
megadiff
"public void newFolderButtonClicked() { // get the selected folder TreePath[] paths = _fileSystemTree.getSelectionPaths(); List selection = getSelectedFolders(paths); if (selection.size() > 1 || selection.size() == 0) return; // sh...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "newFolderButtonClicked"
"public void newFolderButtonClicked() { // get the selected folder TreePath[] paths = _fileSystemTree.getSelectionPaths(); List selection = getSelectedFolders(paths); if (selection.size() > 1 || selection.size() == 0) return; // sh...
Inversion-Mutation
megadiff
"@Override public Value M(Application app, RunTimeState state) { Log.debug("M Application called,state is:"+state.toString()); Value para = (Value) M(app.param,state); boolean issnaped = state.snapshotState(); AnonymousFunction fun = (AnonymousFunction) M(app.func, state); Value rslt = functionCall(fu...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "M"
"@Override public Value M(Application app, RunTimeState state) { Log.debug("M Application called,state is:"+state.toString()); boolean issnaped = state.snapshotState(); AnonymousFunction fun = (AnonymousFunction) M(app.func, state); <MASK>Value para = (Value) M(app.param,state);</MASK> Value rslt = fu...
Inversion-Mutation
megadiff
"@EventHandler public void playerPicksUpItem(PlayerPickupItemEvent event){ if (event.isCancelled()){ return; } Player player = event.getPlayer(); Item item = event.getItem(); ItemStack stack = item.getItemStack(); int maxItems = Config.getItemMax(event.getPlayer(), stack.getType(), stack...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "playerPicksUpItem"
"@EventHandler public void playerPicksUpItem(PlayerPickupItemEvent event){ if (event.isCancelled()){ return; } Player player = event.getPlayer(); Item item = event.getItem(); ItemStack stack = item.getItemStack(); int maxItems = Config.getItemMax(event.getPlayer(), stack.getType(), stack...
Inversion-Mutation
megadiff
"@Override public void onAttachedToWindow() { mPrevRotation = Util.getDisplayRotation((Activity) getContext()); // check if there is any rotation before the view is attached to window int currentOrientation = getResources().getConfiguration().orientation; if (mInitialOrientation...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onAttachedToWindow"
"@Override public void onAttachedToWindow() { // check if there is any rotation before the view is attached to window int currentOrientation = getResources().getConfiguration().orientation; if (mInitialOrientation == currentOrientation) { return; } if (mIn...
Inversion-Mutation
megadiff
"protected void connect () throws IOException { // if we're already connected, we freak out if (_channel != null) { throw new IOException("Already connected."); } // look up the address of the target server InetAdd...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "connect"
"protected void connect () throws IOException { // if we're already connected, we freak out if (_channel != null) { throw new IOException("Already connected."); } // look up the address of the target server InetAdd...
Inversion-Mutation
megadiff
"public EnvironmentObject(String name, UpdatableLocation center) { super(); setLocation(center); init(name); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "EnvironmentObject"
"public EnvironmentObject(String name, UpdatableLocation center) { super(); <MASK>init(name);</MASK> setLocation(center); }"
Inversion-Mutation
megadiff
"private void onBufferDraw() { if (mBuffer == null || mKeyboardChanged) { mKeyboard.setKeyboardWidth(mViewWidth); if (mBuffer == null || mKeyboardChanged && (mBuffer.getWidth() != getWidth() || mBuffer.getHeight() != getHeight())) { // Make sure o...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onBufferDraw"
"private void onBufferDraw() { if (mBuffer == null || mKeyboardChanged) { mKeyboard.setKeyboardWidth(mViewWidth); if (mBuffer == null || mKeyboardChanged && (mBuffer.getWidth() != getWidth() || mBuffer.getHeight() != getHeight())) { // Make sure o...
Inversion-Mutation
megadiff
"public void run() { Image image; while (!interrupted()) { try { Log.d("Input", "Checking for connection in monitor"); monitor.connectionCheck(protocol.getCameraId()); Log.d("Input", "In started to fetch images"); image = protocol.awaitImage(); monitor.putImage(image, protocol.getCame...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run"
"public void run() { Image image; while (!interrupted()) { try { Log.d("Input", "Checking for connection in monitor"); monitor.connectionCheck(protocol.getCameraId()); Log.d("Input", "In started to fetch images"); image = protocol.awaitImage(); monitor.putImage(image, protocol.getCame...
Inversion-Mutation
megadiff
"public void doCommand(Command c){ boolean b = false; if (c.getCommandWord().equals(CommandWords.UNDO)){ c = playerHistory.undo(); b = true; } else if (c.getCommandWord().equals(CommandWords.REDO)){ c = playerHistory.redo(); b = true; } if(c==null){ return; //TODO tell view about ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doCommand"
"public void doCommand(Command c){ boolean b = false; if (c.getCommandWord().equals(CommandWords.UNDO)){ c = playerHistory.undo(); b = true; } else if (c.getCommandWord().equals(CommandWords.REDO)){ c = playerHistory.redo(); b = true; } if(c==null){ return; //TODO tell view about ...
Inversion-Mutation
megadiff
"public File getCachePath(URL url) { // this.log.logFinest("plasmaHTCache: getCachePath: IN=" + url.toString()); String remotePath = url.getFile(); if (!remotePath.startsWith("/")) { remotePath = "/" + remotePath; } if (remotePath.endsWith("/")) { remotePath = remotePath + "nd...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getCachePath"
"public File getCachePath(URL url) { // this.log.logFinest("plasmaHTCache: getCachePath: IN=" + url.toString()); String remotePath = url.getFile(); <MASK>if (remotePath.endsWith("/")) { remotePath = remotePath + "ndx"; }</MASK> if (!remotePath.startsWith("/")) { remotePath = "/" + remo...
Inversion-Mutation
megadiff
"public void paintAsArea(PaintContext pc, SingleTile t) { //#if polish.api.bigstyles WayDescription wayDesc = Legend.getWayDescription(type); //#else WayDescription wayDesc = Legend.getWayDescription((short) (type & 0xff)); //#endif //#if polish.api.bigstyles byte om = Legend.getWayOverviewMode...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "paintAsArea"
"public void paintAsArea(PaintContext pc, SingleTile t) { //#if polish.api.bigstyles WayDescription wayDesc = Legend.getWayDescription(type); //#else WayDescription wayDesc = Legend.getWayDescription((short) (type & 0xff)); //#endif //#if polish.api.bigstyles byte om = Legend.getWayOverviewMode...
Inversion-Mutation
megadiff
"@Override void execute(CharWrapper characters, ProductionContext context) throws Exception { characters.removeSpace(); switch(characters.charAt(0)){ case equal: if(characters.charAt(1) == equal){ characters.shift(2); String value = "=="; if(char...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "execute"
"@Override void execute(CharWrapper characters, ProductionContext context) throws Exception { characters.removeSpace(); switch(characters.charAt(0)){ case equal: if(characters.charAt(1) == equal){ characters.shift(2); String value = "=="; if(char...
Inversion-Mutation
megadiff
"public void idle() { if(state.equals("init")) { System.out.println("Welcome to Bitster! Type \"quit\" to quit."); System.out.println("------------------------------------------"); state = "running"; } String in = s.next(); if(in != null) { if(in.equals("quit")) { ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "idle"
"public void idle() { if(state.equals("init")) { System.out.println("Welcome to Bitster! Type \"quit\" to quit."); System.out.println("------------------------------------------"); state = "running"; } <MASK>System.out.print(prompt);</MASK> String in = s.next(); if(in != nu...
Inversion-Mutation
megadiff
"public void loadWebserver() { InetAddress bindAddress; { String address = configuration.getString("webserver-bindaddress", "0.0.0.0"); try { bindAddress = address.equals("0.0.0.0") ? null : InetAddress.getByN...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "loadWebserver"
"public void loadWebserver() { InetAddress bindAddress; { String address = configuration.getString("webserver-bindaddress", "0.0.0.0"); try { bindAddress = address.equals("0.0.0.0") ? null : InetAddress.getByN...
Inversion-Mutation
megadiff
"static void markAndCopy() { int i, ref; if (!concurrentGc) { getStackRoots(); } getStaticRoots(); for (;;) { // pop one object from the gray list synchronized (mutex) { ref = greyList; if (ref==GREY_END) { break; } greyList = Native.rdMem(ref+OFF_GR...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "markAndCopy"
"static void markAndCopy() { int i, ref; <MASK>getStaticRoots();</MASK> if (!concurrentGc) { getStackRoots(); } for (;;) { // pop one object from the gray list synchronized (mutex) { ref = greyList; if (ref==GREY_END) { break; } greyList = Native.rdM...
Inversion-Mutation
megadiff
"private void writeResult(String sql, String s, SQLException e) throws Exception { assertKnownException(e); s = ("> " + s).trim(); String compare = readLine(); if (compare != null && compare.startsWith(">")) { if (!compare.equals(s)) { if (alwaysReconnec...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "writeResult"
"private void writeResult(String sql, String s, SQLException e) throws Exception { assertKnownException(e); s = ("> " + s).trim(); String compare = readLine(); if (compare != null && compare.startsWith(">")) { if (!compare.equals(s)) { if (alwaysReconnec...
Inversion-Mutation
megadiff
"private static Map<String, Object> markerFromEValidatorDiagnostic(Diagnostic diagnostic) { if (diagnostic.getSeverity() == Diagnostic.OK) return null; Map<String, Object> map = new HashMap<String, Object>(); int sever = IMarker.SEVERITY_ERROR; switch (diagnostic.getSeverity()) { case Diagnostic.WAR...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "markerFromEValidatorDiagnostic"
"private static Map<String, Object> markerFromEValidatorDiagnostic(Diagnostic diagnostic) { if (diagnostic.getSeverity() == Diagnostic.OK) return null; Map<String, Object> map = new HashMap<String, Object>(); int sever = IMarker.SEVERITY_ERROR; switch (diagnostic.getSeverity()) { case Diagnostic.WAR...
Inversion-Mutation
megadiff
"public void defineLanguages() { en = new ArrayList<String>(); en.add(STOP, "stop:wait:don't:no:damn"); en.add(EXPLORE, "explore:try"); en.add(FORWARD, "forward:ahead"); en.add(REVERSE, "reverse:back"); en.add(ROTATERIGHT, "rotate&right"); en.add(ROTATELEFT, "rotate&left"); en.ad...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "defineLanguages"
"public void defineLanguages() { en = new ArrayList<String>(); en.add(STOP, "stop:wait:don't:no:damn"); en.add(EXPLORE, "explore:try"); en.add(FORWARD, "forward:ahead"); en.add(REVERSE, "reverse:back"); en.add(ROTATERIGHT, "rotate&right"); en.add(ROTATELEFT, "rotate&left"); en.ad...
Inversion-Mutation
megadiff
"private void firePendingTextChangeEvent() { if (textChangeEventPending) { textChangeEventPending = false; fireEvent(new TextChangeEventImpl(this)); } }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "firePendingTextChangeEvent"
"private void firePendingTextChangeEvent() { if (textChangeEventPending) { <MASK>fireEvent(new TextChangeEventImpl(this));</MASK> textChangeEventPending = false; } }"
Inversion-Mutation
megadiff
"@Override public void tick() { if (--currentTick > 0) return; if(stalled) currentTick = stalledDelay; else currentTick = normalDelay; //Extract Item IInventory targetInventory = _invProvider.getPointedInventory(); if (targetInventory == null) return; if (targetInventory.getSizeInve...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "tick"
"@Override public void tick() { if (--currentTick > 0) return; if(stalled) currentTick = stalledDelay; else currentTick = normalDelay; //Extract Item IInventory targetInventory = _invProvider.getPointedInventory(); if (targetInventory == null) return; if (targetInventory.getSizeInve...
Inversion-Mutation
megadiff
"@Override protected DataKind addDataKindPhone(Context context) throws DefinitionException { final DataKind kind = super.addDataKindPhone(context); kind.typeColumn = Phone.TYPE; kind.typeList = Lists.newArrayList(); kind.typeList.add(buildPhoneType(Phone.TYPE_MOBILE).setSpeci...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "addDataKindPhone"
"@Override protected DataKind addDataKindPhone(Context context) throws DefinitionException { final DataKind kind = super.addDataKindPhone(context); kind.typeColumn = Phone.TYPE; kind.typeList = Lists.newArrayList(); <MASK>kind.typeList.add(buildPhoneType(Phone.TYPE_HOME).setSp...
Inversion-Mutation
megadiff
"protected long[] logAllocate(long[] physPos) { openLogIfNeeded(); logSize+=1+8+8; //space used for index val long[] ret = new long[physPos.length]; for(int i=0;i<physPos.length;i++){ long size = (physPos[i]&MASK_SIZE)>>>48; //would overlaps Volume Block...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "logAllocate"
"protected long[] logAllocate(long[] physPos) { openLogIfNeeded(); logSize+=1+8+8; //space used for index val long[] ret = new long[physPos.length]; for(int i=0;i<physPos.length;i++){ long size = (physPos[i]&MASK_SIZE)>>>48; //would overlaps Volume Block...
Inversion-Mutation
megadiff
"@Override public List<BeanMetaData> getBeans() { ArrayList<BeanMetaData> result = new ArrayList<BeanMetaData>(); //Create AspectBinding AbstractBeanMetaData binding = new AbstractBeanMetaData(); if (name == null) { name = GUID.asString(); } binding.s...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getBeans"
"@Override public List<BeanMetaData> getBeans() { ArrayList<BeanMetaData> result = new ArrayList<BeanMetaData>(); //Create AspectBinding AbstractBeanMetaData binding = new AbstractBeanMetaData(); if (name == null) { name = GUID.asString(); } binding.s...
Inversion-Mutation
megadiff
"protected void setup(Slot s, Rendered r) { T t = map(r); super.setup(s, r); Location loc = s.os.get(PView.loc); plain.copy(s.os); s.os.put(PView.loc, loc); if(t != null) { Color col = newcol(t); new States.ColState(col).prep(s.os); } }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setup"
"protected void setup(Slot s, Rendered r) { T t = map(r); Location loc = s.os.get(PView.loc); plain.copy(s.os); s.os.put(PView.loc, loc); if(t != null) { Color col = newcol(t); new States.ColState(col).prep(s.os); } <MASK>super.setup(s, r);</MASK> }"
Inversion-Mutation
megadiff
"private static void startup(String homePath, long startupMemFree, long startupMemTotal) { long startup = System.currentTimeMillis(); int oldRev=0; int newRev=0; try { // start up System.out.println(copyright); System.out.println(hline); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "startup"
"private static void startup(String homePath, long startupMemFree, long startupMemTotal) { long startup = System.currentTimeMillis(); int oldRev=0; int newRev=0; try { // start up System.out.println(copyright); System.out.println(hline); ...
Inversion-Mutation
megadiff
"private void fireOnOpen() { if (openHandler_ == null) { return; } final Scriptable scope = openHandler_.getParentScope(); final JavaScriptEngine jsEngine = containingPage_.getWebClient().getJavaScriptEngine(); jsEngine.callFunction(containingPage_, openHandler...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "fireOnOpen"
"private void fireOnOpen() { <MASK>final Scriptable scope = openHandler_.getParentScope();</MASK> if (openHandler_ == null) { return; } final JavaScriptEngine jsEngine = containingPage_.getWebClient().getJavaScriptEngine(); jsEngine.callFunction(containingPage_...
Inversion-Mutation
megadiff
"public TextField(String label, String text, int maxSize, int constraints) { super(label); super.setUI(DeviceFactory.getDevice().getUIFactory().createTextFieldUI(this)); if (maxSize <= 0) { throw new IllegalArgumentException(); } setConstraints(constraints); if (!InputMethod.validate(...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "TextField"
"public TextField(String label, String text, int maxSize, int constraints) { super(label); super.setUI(DeviceFactory.getDevice().getUIFactory().createTextFieldUI(this)); if (maxSize <= 0) { throw new IllegalArgumentException(); } setConstraints(constraints); if (!InputMethod.validate(...
Inversion-Mutation
megadiff
"public static void main(String[] args) { DrawingPanel form = new DrawingPanel(); JFrame frame = new JFrame("Bouncy Balls"); frame.setSize(600, 600); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.add(form); frame.setVisible(true); }"
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) { DrawingPanel form = new DrawingPanel(); JFrame frame = new JFrame("Bouncy Balls"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.add(form); <MASK>frame.setSize(600, 600);</MASK> frame.setVisible(true); }"
Inversion-Mutation
megadiff
"private static String getCurrentDateString() { Date currentDate; int month, day, year, hour, min, sec; String output=""; currentDate = new Date(); month = (currentDate.getMonth()+1)%12; day = currentDate.getDate(); year = currentDate.getYear()+1900;...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getCurrentDateString"
"private static String getCurrentDateString() { Date currentDate; int month, day, year, hour, min, sec; String output=""; currentDate = new Date(); month = (currentDate.getMonth()+1)%12; day = currentDate.getDate(); year = currentDate.getYear()+1900;...
Inversion-Mutation
megadiff
"public static BroadcastGroupConfiguration randomBroadcastGroupConfiguration(List<Pair<String, String>> connectorInfos) { return new BroadcastGroupConfiguration(randomString(), randomPort(), "231.7.7.7", ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "randomBroadcastGroupConfiguration"
"public static BroadcastGroupConfiguration randomBroadcastGroupConfiguration(List<Pair<String, String>> connectorInfos) { return new BroadcastGroupConfiguration(randomString(), randomPort(), "231.7.7.7", ...
Inversion-Mutation
megadiff
"private void saveState() { mDbHelper.updateDiyActions(mRowId, maction_notification_param_www_text.getText().toString(),// maction_notification_param_www_switch.isChecked(),// // TEMPLATE: m{lowercase}.{retrieve}(),// maction_wifi.isChecked(),// maction_wifi_param_turn_on.isChecked(),/...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "saveState"
"private void saveState() { mDbHelper.updateDiyActions(mRowId, maction_notification_param_www_text.getText().toString(),// maction_notification_param_www_switch.isChecked(),// // TEMPLATE: m{lowercase}.{retrieve}(),// maction_wifi.isChecked(),// maction_wifi_param_turn_on.isChecked(),/...
Inversion-Mutation
megadiff
"@Override protected void onPostCreate(Bundle savedInstanceState) { super.onPostCreate(savedInstanceState); Intent intent = getIntent(); QRCodeUrlAnalyser qrCodeUrlAnalyser = new QRCodeUrlAnalyser(); if(Intent.ACTION_VIEW.equals(intent.getAction()) || NFC_INTENT.equals(intent.getAction())){...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onPostCreate"
"@Override protected void onPostCreate(Bundle savedInstanceState) { super.onPostCreate(savedInstanceState); Intent intent = getIntent(); <MASK>if(Intent.ACTION_VIEW.equals(intent.getAction()) || NFC_INTENT.equals(intent.getAction())){</MASK> QRCodeUrlAnalyser qrCodeUrlAnalyser = new QRCodeUrl...
Inversion-Mutation
megadiff
"public ZooKeeperWatcher(Configuration conf, String descriptor, Abortable abortable) throws IOException { this.quorum = ZKConfig.getZKQuorumServersString(conf); // Identifier will get the sessionid appended later below down when we // handle the syncconnect event. this.identifier = descri...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "ZooKeeperWatcher"
"public ZooKeeperWatcher(Configuration conf, String descriptor, Abortable abortable) throws IOException { this.quorum = ZKConfig.getZKQuorumServersString(conf); <MASK>this.zooKeeper = ZKUtil.connect(conf, quorum, this, descriptor);</MASK> // Identifier will get the sessionid appended later belo...
Inversion-Mutation
megadiff
"public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); final ActionBar actionBar = getSupportActionBar(); actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); actionBar.setDisplayShowTitleEnabled(false); actionBar.setDisplayShowHom...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onCreate"
"public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); <MASK>onNewIntent(getIntent());</MASK> final ActionBar actionBar = getSupportActionBar(); actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); actionBar.setDisplayShowTitleEnabl...
Inversion-Mutation
megadiff
"public void actionPerformed(ActionEvent event) { logger.debug("About to change atom type of relevant atom!"); IChemObject object = getSource(event); logger.debug("Source of call: ", object); Iterator<IAtom> atomsInRange = null; if (object == null){ //this means the main menu was used if(...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "actionPerformed"
"public void actionPerformed(ActionEvent event) { logger.debug("About to change atom type of relevant atom!"); IChemObject object = getSource(event); logger.debug("Source of call: ", object); Iterator<IAtom> atomsInRange = null; if (object == null){ //this means the main menu was used if(...
Inversion-Mutation
megadiff
"@Override public boolean onMenuOpened(int featureId, Menu menu) { if (mInvalidateMenu) { if (menu != null) { menu.clear(); onCreateOptionsMenu(menu); } mInvalidateMenu = false; } return super.onMenuOpened(featureId, m...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onMenuOpened"
"@Override public boolean onMenuOpened(int featureId, Menu menu) { if (mInvalidateMenu) { if (menu != null) { menu.clear(); } <MASK>onCreateOptionsMenu(menu);</MASK> mInvalidateMenu = false; } return super.onMenuOpened(fea...
Inversion-Mutation
megadiff
"public void run() { while (!stopShipping) { try { synchronized (forceFlushSemaphore) { shipALogChunk(); // Wake up a thread waiting for forceFlush, if any forceFlushSemaphore.notify(); } ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run"
"public void run() { while (!stopShipping) { try { <MASK>shipALogChunk();</MASK> synchronized (forceFlushSemaphore) { // Wake up a thread waiting for forceFlush, if any forceFlushSemaphore.notify(); } ...
Inversion-Mutation
megadiff
"public void gotoMarker(IMarker marker) { if(marker == null || getModelObject() == null || !marker.exists()) return; String path = marker.getAttribute("path", null); //$NON-NLS-1$ if(path != null) { XModelObject o = getModelObject().getModel().getByPath(path); if(o == null) return; selectionProvide...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "gotoMarker"
"public void gotoMarker(IMarker marker) { if(marker == null || getModelObject() == null || !marker.exists()) return; String path = marker.getAttribute("path", null); //$NON-NLS-1$ if(path != null) { XModelObject o = getModelObject().getModel().getByPath(path); if(o == null) return; selectionProvide...
Inversion-Mutation
megadiff
"@Override public void enable() { addedTabs = new HashMap<WindowComponentPattern, ComponentPattern>(); for (ViewExtension viewExtension : viewExtensions) { ViewDefinition viewDefinition = viewDefinitionService.getWithoutSession(viewExtension.getPluginName(), vi...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "enable"
"@Override public void enable() { addedTabs = new HashMap<WindowComponentPattern, ComponentPattern>(); for (ViewExtension viewExtension : viewExtensions) { ViewDefinition viewDefinition = viewDefinitionService.getWithoutSession(viewExtension.getPluginName(), vi...
Inversion-Mutation
megadiff
"@Override public void onResume() { super.onResume(); setUpAdapter(); doResumeUpdates(); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onResume"
"@Override public void onResume() { super.onResume(); <MASK>doResumeUpdates();</MASK> setUpAdapter(); }"
Inversion-Mutation
megadiff
"@Override public void paintComponent(final Graphics graphics) { final Graphics2D g = (Graphics2D) graphics; final Map desktopHints = (Map) Toolkit.getDefaultToolkit(). getDesktopProperty("awt.font.desktophints"); if (desktopHints != null) { g.addRendering...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "paintComponent"
"@Override public void paintComponent(final Graphics graphics) { final Graphics2D g = (Graphics2D) graphics; final Map desktopHints = (Map) Toolkit.getDefaultToolkit(). getDesktopProperty("awt.font.desktophints"); if (desktopHints != null) { g.addRendering...
Inversion-Mutation
megadiff
"private String applyFilter() { try { boolean passing = true; long vcfId = this.connection.getVcfId( this.vcfName); initializeVcf( vcfId ); ResultSet entries = this.connection.getVcfEntries( vcfId ); while (entries.next() ) { long entryId = entries.getLong("EntryId"...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "applyFilter"
"private String applyFilter() { try { boolean passing = true; long vcfId = this.connection.getVcfId( this.vcfName); initializeVcf( vcfId ); ResultSet entries = this.connection.getVcfEntries( vcfId ); while (entries.next() ) { processUntestedEntry( entries ); p...
Inversion-Mutation
megadiff
"private synchronized ValueTable getFirstTableWithVariable(String variableName) { if(variableNameToTableMap == null) { variableNameToTableMap = new HashMap<String, ValueTable>(); } ValueTable cachedTable = variableNameToTableMap.get(variableName); if(cachedTable != null) { return cac...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getFirstTableWithVariable"
"private synchronized ValueTable getFirstTableWithVariable(String variableName) { if(variableNameToTableMap == null) { variableNameToTableMap = new HashMap<String, ValueTable>(); } ValueTable cachedTable = variableNameToTableMap.get(variableName); if(cachedTable != null) { return cac...
Inversion-Mutation
megadiff
"public void notifyHeartbeat(HeartbeatData hbData) { lastHeartbeatDuration = 0; hbTime[rrdPtr] = System.currentTimeMillis(); if (hbData != null) { heapInitSize[rrdPtr] = hbData.heapInitSize; heapUsedSize[rrdPtr] = hbData.heapUsedSize; heapCommittedSize[r...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "notifyHeartbeat"
"public void notifyHeartbeat(HeartbeatData hbData) { lastHeartbeatDuration = 0; hbTime[rrdPtr] = System.currentTimeMillis(); if (hbData != null) { heapInitSize[rrdPtr] = hbData.heapInitSize; heapUsedSize[rrdPtr] = hbData.heapUsedSize; heapCommittedSize[r...
Inversion-Mutation
megadiff
"@Override public void channelRead(ChannelHandlerContext ctx, Object m) throws Exception { if (!(m instanceof ByteBuf)) { conn.notifyRead(m); return; } ByteBuf data = (ByteBuf) m; if (remainder == null) { try { passToConnection(data); } finally { if (data.isReadable()) { ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "channelRead"
"@Override public void channelRead(ChannelHandlerContext ctx, Object m) throws Exception { if (!(m instanceof ByteBuf)) { conn.notifyRead(m); <MASK>return;</MASK> } ByteBuf data = (ByteBuf) m; if (remainder == null) { try { passToConnection(data); } finally { if (data.isReadabl...
Inversion-Mutation
megadiff
"@Override public void onReceive( final Object msg ) throws Exception { if ( msg instanceof Passenger ) { Passenger p = (Passenger)msg; printMsg("Passenger " + p.getName() + " arrives in line"); // If msg is a Passenger, immediately send their luggage off to BaggageS...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onReceive"
"@Override public void onReceive( final Object msg ) throws Exception { if ( msg instanceof Passenger ) { Passenger p = (Passenger)msg; printMsg("Passenger " + p.getName() + " arrives in line"); // If msg is a Passenger, immediately send their luggage off to BaggageS...
Inversion-Mutation
megadiff
"public IEvaluatedType evaluateGoal(IGoal rootGoal, long timeLimit) { if (rootGoal == null) return null; rootGoal = evaluatorFactory.translateGoal(rootGoal); totalGoalsRequested++; if (isInStack(rootGoal)) { totalRecursiveRequests++; return RecursionTypeCall.INSTANCE; } IEvaluated...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "evaluateGoal"
"public IEvaluatedType evaluateGoal(IGoal rootGoal, long timeLimit) { <MASK>rootGoal = evaluatorFactory.translateGoal(rootGoal);</MASK> if (rootGoal == null) return null; totalGoalsRequested++; if (isInStack(rootGoal)) { totalRecursiveRequests++; return RecursionTypeCall.INSTANCE; } ...
Inversion-Mutation
megadiff
"@Override public void run() { int count = 0; int total = 0; String prefix = mVideoListActivity.getResources().getString(R.string.thumbnail); while (!isInterrupted()) { lock.lock(); // Get the id of the file browser item to create its thumbnail. ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run"
"@Override public void run() { int count = 0; int total = 0; String prefix = mVideoListActivity.getResources().getString(R.string.thumbnail); while (!isInterrupted()) { lock.lock(); // Get the id of the file browser item to create its thumbnail. ...
Inversion-Mutation
megadiff
"@Override protected void doHandler(HttpServletRequest request, HttpServletResponse response, PageContext pageContext, SectionDefinition sectionDefinition, List<SectionField> sectionFields, SectionField currentField, TangerineForm form, String formFieldName, Object fiel...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doHandler"
"@Override protected void doHandler(HttpServletRequest request, HttpServletResponse response, PageContext pageContext, SectionDefinition sectionDefinition, List<SectionField> sectionFields, SectionField currentField, TangerineForm form, String formFieldName, Object fiel...
Inversion-Mutation
megadiff
"public void encodeBegin(FacesContext context) throws IOException { ResponseWriter writer = context.getResponseWriter(); writer.startElement("span", this); writer.writeAttribute("id", getClientId(context), null); writer.startElement("script", this); write...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "encodeBegin"
"public void encodeBegin(FacesContext context) throws IOException { ResponseWriter writer = context.getResponseWriter(); writer.startElement("span", this); writer.writeAttribute("id", getClientId(context), null); writer.startElement("script", this); write...
Inversion-Mutation
megadiff
"public DeviceFrame(Application app, AndroidDevice device) { this.app = app; this.device = device; this.log = Logger.getLogger(DeviceFrame.class.getName() + ":" + device.getName()); log.debug(String.format("DeviceFrame(device=%s)", device)); Settings cfg = app.getSettings(); set...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "DeviceFrame"
"public DeviceFrame(Application app, AndroidDevice device) { this.app = app; this.device = device; this.log = Logger.getLogger(DeviceFrame.class.getName() + ":" + device.getName()); log.debug(String.format("DeviceFrame(device=%s)", device)); Settings cfg = app.getSettings(); set...
Inversion-Mutation
megadiff
"public static Test suite() { TestSuite suite = new TestSuite("Test for org.eclipse.mylar.tests"); //$JUnit-BEGIN$ // NOTE: the order of these tests matters // TODO: make tests clear workbench state on completion suite.addTest(AllMonitorTests.suite()); su...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "suite"
"public static Test suite() { TestSuite suite = new TestSuite("Test for org.eclipse.mylar.tests"); //$JUnit-BEGIN$ // NOTE: the order of these tests matters // TODO: make tests clear workbench state on completion suite.addTest(AllMonitorTests.suite()); su...
Inversion-Mutation
megadiff
"@Override public void visit(DexInstruction_BinaryOpWide instruction) { assert DexRegisterHelper.isPair(instruction.getRegSourceA1(), instruction.getRegSourceA2()); assert DexRegisterHelper.isPair(instruction.getRegSourceB1(), instruction.getRegSourceB2()); assert DexRegisterHelper.isPair(instruction.getRegT...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "visit"
"@Override public void visit(DexInstruction_BinaryOpWide instruction) { assert DexRegisterHelper.isPair(instruction.getRegSourceA1(), instruction.getRegSourceA2()); assert DexRegisterHelper.isPair(instruction.getRegSourceB1(), instruction.getRegSourceB2()); assert DexRegisterHelper.isPair(instruction.getRegT...
Inversion-Mutation
megadiff
"public void cleanVolume(String volumeId) { try { updateVolumeGroup(); VolumeEntityWrapperManager volumeManager = new VolumeEntityWrapperManager(); LVMVolumeInfo lvmVolInfo = volumeManager.getVolumeInfo(volumeId); if(lvmVolInfo != null) { volumeManager.unexportVolume(lvmVolInfo); String lvN...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "cleanVolume"
"public void cleanVolume(String volumeId) { try { updateVolumeGroup(); VolumeEntityWrapperManager volumeManager = new VolumeEntityWrapperManager(); LVMVolumeInfo lvmVolInfo = volumeManager.getVolumeInfo(volumeId); if(lvmVolInfo != null) { volumeManager.unexportVolume(lvmVolInfo); String lvN...
Inversion-Mutation
megadiff
"public void deleteData() throws SQLException, IOException { update("delete from budget_line_items"); update("delete from budget_file_info"); update("delete from role_rights where roleId not in(1)"); update("delete from role_assignments where userId not in (1)"); update("delete from fulfillment...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "deleteData"
"public void deleteData() throws SQLException, IOException { update("delete from budget_line_items"); update("delete from budget_file_info"); update("delete from role_rights where roleId not in(1)"); update("delete from role_assignments where userId not in (1)"); update("delete from fulfillment...
Inversion-Mutation
megadiff
"private void startup() { // Stop the handler mTimer.removeCallbacks(mTask); // Set the condition to time up Global.GAME_STATE.timerCondition = TimerCondition.STARTING; // Reset the time Global.GAME_STATE.resetTime(); // Enable both buttons mLeftButton.setEnabled(true); mRightButton...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "startup"
"private void startup() { // Stop the handler mTimer.removeCallbacks(mTask); // Set the condition to time up Global.GAME_STATE.timerCondition = TimerCondition.STARTING; // Reset the time Global.GAME_STATE.resetTime(); // Enable both buttons mLeftButton.setEnabled(true); mRightButton...
Inversion-Mutation
megadiff
"private void enterOverworldMode() { startWorldThread(); ui.switchToOverworldScreen(); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "enterOverworldMode"
"private void enterOverworldMode() { <MASK>ui.switchToOverworldScreen();</MASK> startWorldThread(); }"
Inversion-Mutation
megadiff
"private boolean commandRes(String[] args, boolean resadmin, Command command, CommandSender sender){ if (args.length > 0 && args[args.length - 1].equalsIgnoreCase("?") || args.length > 1 && args[args.length - 2].equals("?")) { return commandHelp(args, resadmin, sender); } int page = 1; try{ if(args....
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "commandRes"
"private boolean commandRes(String[] args, boolean resadmin, Command command, CommandSender sender){ if (args.length > 0 && args[args.length - 1].equalsIgnoreCase("?") || args.length > 1 && args[args.length - 2].equals("?")) { return commandHelp(args, resadmin, sender); } int page = 1; try{ if(args....
Inversion-Mutation
megadiff
"@Override protected void onCreate(Bundle savedInstanceState) { setTheme(UserPreferences.getTheme()); super.onCreate(savedInstanceState); getSupportActionBar().setDisplayHomeAsUpEnabled(true); setContentView(R.layout.gpodnetauth_activity); service = new GpodnetServic...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onCreate"
"@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); getSupportActionBar().setDisplayHomeAsUpEnabled(true); <MASK>setTheme(UserPreferences.getTheme());</MASK> setContentView(R.layout.gpodnetauth_activity); service = new ...
Inversion-Mutation
megadiff
"public void doFilter(ServletRequest req, ServletResponse response, FilterChain filterChain) throws IOException, ServletException { HttpServletRequest hreq = (HttpServletRequest)req; final HttpServletResponse resp = (HttpServletResponse)response; ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doFilter"
"public void doFilter(ServletRequest req, ServletResponse response, FilterChain filterChain) throws IOException, ServletException { HttpServletRequest hreq = (HttpServletRequest)req; final HttpServletResponse resp = (HttpServletResponse)response; ...
Inversion-Mutation
megadiff
"public static IDataset getSlice(final ILazyDataset ld, final SliceObject currentSlice, final IProgressMonitor monitor) throws Exception { final int[] dataShape = currentSlice.getFullShape(); if (monitor!=null&&monitor.isCanceled()) return null; // This is the bit that...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getSlice"
"public static IDataset getSlice(final ILazyDataset ld, final SliceObject currentSlice, final IProgressMonitor monitor) throws Exception { final int[] dataShape = currentSlice.getFullShape(); if (monitor!=null&&monitor.isCanceled()) return null; // This is the bit that...
Inversion-Mutation
megadiff
"private void setDirection( int direction ) { currentDirection = direction; speed = SPEED; switch( currentDirection ) { case LEFT_DIRECTION: rightSprite.setVisible(false); leftSprite.setVisible(true); leftSprite.animate...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setDirection"
"private void setDirection( int direction ) { currentDirection = direction; speed = SPEED; switch( currentDirection ) { case LEFT_DIRECTION: leftSprite.setVisible(true); <MASK>rightSprite.setVisible(false);</MASK> leftSpri...
Inversion-Mutation
megadiff
"private synchronized KAuthFile getAuthFile() throws AuthenticationException { try { if (_kpwdFile != null && _kpwdFile.lastModified() >= _cacheTime) { _cacheAuthFile = new KAuthFile(_kpwdFile.getPath()); _cacheTime = System.currentTimeMillis(); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getAuthFile"
"private synchronized KAuthFile getAuthFile() throws AuthenticationException { try { if (_kpwdFile != null && _kpwdFile.lastModified() >= _cacheTime) { <MASK>_cacheTime = System.currentTimeMillis();</MASK> _cacheAuthFile = new KAuthFile(_kpwdFile.get...
Inversion-Mutation
megadiff
"public HttpExchangeImpl( final HttpRequest request, final HttpRoute route, final Object state, final IOSessionManager<HttpRoute> sessmrg) { super(); this.request = request; this.responseFuture = new BasicFuture<HttpResponse>(null); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "HttpExchangeImpl"
"public HttpExchangeImpl( final HttpRequest request, final HttpRoute route, final Object state, final IOSessionManager<HttpRoute> sessmrg) { super(); this.request = request; <MASK>this.sessionFuture = sessmrg.leaseSession(route, state, new I...
Inversion-Mutation
megadiff
"public void populateKryo(Kryo k) { k.setRegistrationOptional(getAcceptAll()); registerHierarchies(k, getHierarchyRegistrations(), getSkipMissing()); registerBasic(k, getSerializations(), getSkipMissing()); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "populateKryo"
"public void populateKryo(Kryo k) { k.setRegistrationOptional(getAcceptAll()); <MASK>registerBasic(k, getSerializations(), getSkipMissing());</MASK> registerHierarchies(k, getHierarchyRegistrations(), getSkipMissing()); }"
Inversion-Mutation
megadiff
"public static Object getInstance(final Class<?> clazz, final Object[][] prioritizedParameters) { Object object = null; for (Object[] parameters : prioritizedParameters) { Constructor<?> constructor; Class<?>[] parameterClasses = getParameterClasses(parameters); try { if (object == null) { ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getInstance"
"public static Object getInstance(final Class<?> clazz, final Object[][] prioritizedParameters) { Object object = null; for (Object[] parameters : prioritizedParameters) { Constructor<?> constructor; Class<?>[] parameterClasses = getParameterClasses(parameters); try { if (object == null) { ...
Inversion-Mutation
megadiff
"public String toXML() { StringBuffer buf = new StringBuffer(); buf.append("<iq "); if (getPacketID() != null) { buf.append("id=\"" + getPacketID() + "\" "); } if (getTo() != null) { buf.append("to=\"").append(getTo()).append("\" "); } ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "toXML"
"public String toXML() { StringBuffer buf = new StringBuffer(); buf.append("<iq "); if (getPacketID() != null) { buf.append("id=\"" + getPacketID() + "\" "); } if (getTo() != null) { buf.append("to=\"").append(getTo()).append("\" "); } ...
Inversion-Mutation
megadiff
"private static void setupStatic(NoItem instance) { NoItem.instance = instance; NoItem.config = new Config(); NoItem.permsManager = new PermMan(); NoItem.lists = new Lists(); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setupStatic"
"private static void setupStatic(NoItem instance) { NoItem.instance = instance; <MASK>NoItem.permsManager = new PermMan();</MASK> NoItem.config = new Config(); NoItem.lists = new Lists(); }"
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 createNormalLayout() { preLoadImages(); layout = new GridBagLayout(); gbConstraints = new GridBagConstraints(); setLayout(layout); // Create constraint for first component as standard constraint. parent.buildConstraints(gbConstraints, 0, 0, 1, 1, 0.25, 0.0); g...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createNormalLayout"
"protected void createNormalLayout() { preLoadImages(); layout = new GridBagLayout(); gbConstraints = new GridBagConstraints(); setLayout(layout); // Create constraint for first component as standard constraint. parent.buildConstraints(gbConstraints, 0, 0, 1, 1, 0.25, 0.0); g...
Inversion-Mutation
megadiff
"private void addActionsToMenu() { Set<TaskRepository> includedRepositories = new HashSet<TaskRepository>(); TaskRepository localRepository = TasksUi.getRepositoryManager().getRepository( LocalRepositoryConnector.CONNECTOR_KIND, LocalRepositoryConnector.REPOSITORY_URL); addRepositoryAction(localReposito...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "addActionsToMenu"
"private void addActionsToMenu() { Set<TaskRepository> includedRepositories = new HashSet<TaskRepository>(); TaskRepository localRepository = TasksUi.getRepositoryManager().getRepository( LocalRepositoryConnector.CONNECTOR_KIND, LocalRepositoryConnector.REPOSITORY_URL); addRepositoryAction(localReposito...
Inversion-Mutation
megadiff
"private void processBuffer() { try { while (!buffer.isEmpty()) { logger.debug("Executing "+buffer.size()+" database actions."); IDatabaseAction databaseAction = buffer.peek(); databaseAction.run(); buffer.poll(); } if (ModelUtility.hasImportedProjects(ResourcesPlugin.getWorkspace())...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "processBuffer"
"private void processBuffer() { try { <MASK>logger.debug("Executing "+buffer.size()+" database actions.");</MASK> while (!buffer.isEmpty()) { IDatabaseAction databaseAction = buffer.peek(); databaseAction.run(); buffer.poll(); } if (ModelUtility.hasImportedProjects(ResourcesPlugin.get...
Inversion-Mutation
megadiff
"void initGrabber(int w, int h, int _targetFps){ if(deviceID==-1) camera = Camera.open(); else{ try { int numCameras = (Integer) Camera.class.getMethod("getNumberOfCameras").invoke(null); Class<?> cameraInfoClass = Class.forName("android.hardware.Camera$CameraInfo"); Object cameraInfo = ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "initGrabber"
"void initGrabber(int w, int h, int _targetFps){ if(deviceID==-1) <MASK>camera = Camera.open();</MASK> else{ try { int numCameras = (Integer) Camera.class.getMethod("getNumberOfCameras").invoke(null); Class<?> cameraInfoClass = Class.forName("android.hardware.Camera$CameraInfo"); Object ...
Inversion-Mutation
megadiff
"private void clear() { setRegisterKeys(false); body.clear(); patchSetPanels.clear(); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "clear"
"private void clear() { body.clear(); patchSetPanels.clear(); <MASK>setRegisterKeys(false);</MASK> }"
Inversion-Mutation
megadiff
"public String render(Report report) { StringBuffer buf = new StringBuffer(quoteAndCommify("Problem")); buf.append(quoteAndCommify("Package")); buf.append(quoteAndCommify("File")); buf.append(quoteAndCommify("Priority")); buf.append(quoteAndCommify("Line")); buf.ap...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "render"
"public String render(Report report) { StringBuffer buf = new StringBuffer(quoteAndCommify("Problem")); buf.append(quoteAndCommify("Package")); buf.append(quoteAndCommify("File")); <MASK>buf.append(quoteAndCommify("Line"));</MASK> buf.append(quoteAndCommify("Priority")); ...
Inversion-Mutation
megadiff
"void runLogic() { /* * Don't yet know the train/track implementation to * determine if a train is headed for the train yard. */ /* Switch tySwitch = (Switch) track.get(trackEnd()); Train train = tySwitch.getTrain(); if ((train != null) && train.needsToGoToTrainYard()) { tySwitch.set...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "runLogic"
"void runLogic() { /* * Don't yet know the train/track implementation to * determine if a train is headed for the train yard. */ /* Switch tySwitch = (Switch) track.get(trackEnd()); Train train = tySwitch.getTrain(); if ((train != null) && train.needsToGoToTrainYard()) { tySwitch.set...