type
stringclasses
1 value
dataset
stringclasses
1 value
input
stringlengths
75
160k
instruction
stringlengths
117
171
output
stringlengths
88
168k
Inversion-Mutation
megadiff
"public void put(Identifier ident, Item item) { if (item == null || ident == null) { return; } synchronized (range) { map.put(ident, item); if (range.contains(ident)) { range.remove(ident); } range.push(ident); clean(); } }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "put"
"public void put(Identifier ident, Item item) { if (item == null || ident == null) { return; } <MASK>map.put(ident, item);</MASK> synchronized (range) { if (range.contains(ident)) { range.remove(ident); } range.push(ident); clean(); } }"
Inversion-Mutation
megadiff
"@Override public void appModeChanged() { setCursor(new Cursor(Cursor.WAIT_CURSOR)); if (currentMode != null) { saveLayout(FILEPATH_LAYOUT + "." + currentMode.name()); saveConfig(FILEPATH_MAP + "." + currentMode.name()); } final CidsAppBackend.Mode ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "appModeChanged"
"@Override public void appModeChanged() { setCursor(new Cursor(Cursor.WAIT_CURSOR)); if (currentMode != null) { saveLayout(FILEPATH_LAYOUT + "." + currentMode.name()); saveConfig(FILEPATH_MAP + "." + currentMode.name()); } final CidsAppBackend.Mode ...
Inversion-Mutation
megadiff
"public static void main(String[] args) { IPAddress ip = new IPAddress(); String myIP = ip.getIPaddress(); String yourIP = "192.168.1.51"; //myIP; //should be whatever the other user's IP is, ultimately String me = "david"; //will come from the user starting up the application, ultimately String sende...
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) { IPAddress ip = new IPAddress(); String myIP = ip.getIPaddress(); String yourIP = "192.168.1.51"; //myIP; //should be whatever the other user's IP is, ultimately <MASK>String sender_server = "sender_server@";</MASK> String me = "david"; //will come from the user...
Inversion-Mutation
megadiff
"public HttpUrlConnectionCall(HttpClientHelper helper, String method, String requestUri, boolean hasEntity) throws IOException { super(helper, method, requestUri); if (requestUri.startsWith("http")) { URL url = new URL(requestUri); this.connection = (HttpURLCon...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "HttpUrlConnectionCall"
"public HttpUrlConnectionCall(HttpClientHelper helper, String method, String requestUri, boolean hasEntity) throws IOException { super(helper, method, requestUri); if (requestUri.startsWith("http")) { URL url = new URL(requestUri); this.connection = (HttpURLCon...
Inversion-Mutation
megadiff
"public void draw(Canvas canvas) { try { canvas.drawRGB(255, 255, 255); canvas.drawBitmap(renderView.bolo.getBitmap(), 10, 310, null); for(Mosca it:renderView.moscas) { if(it.getY() < 450) it.move(); else { System.out.format("valor %d\n", it.getStatus()); if(it.getStatus() ==...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "draw"
"public void draw(Canvas canvas) { <MASK>canvas.drawRGB(255, 255, 255);</MASK> try { canvas.drawBitmap(renderView.bolo.getBitmap(), 10, 310, null); for(Mosca it:renderView.moscas) { if(it.getY() < 450) it.move(); else { System.out.format("valor %d\n", it.getStatus()); if(it.ge...
Inversion-Mutation
megadiff
"public void doPlot(NEFEnsemble ensemble) { XYSeriesCollection dataset = new XYSeriesCollection(); synchronized(ensemble){ float[][] encoders = ensemble.getEncoders(); NEFNode[] nodes = (NEFNode[]) ensemble.getNodes(); float[] x = new float[101]; for (int i = 0; i < x.length; i++) { x[...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doPlot"
"public void doPlot(NEFEnsemble ensemble) { XYSeriesCollection dataset = new XYSeriesCollection(); synchronized(ensemble){ float[][] encoders = ensemble.getEncoders(); NEFNode[] nodes = (NEFNode[]) ensemble.getNodes(); float[] x = new float[101]; for (int i = 0; i < x.length; i++) { x[...
Inversion-Mutation
megadiff
"public void hidePlaceholder() { if (super.getText().equals(this.getPlaceholderText())) { super.setText(""); } super.removeStyleName(this.getPlaceholderStyleName()); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "hidePlaceholder"
"public void hidePlaceholder() { if (super.getText().equals(this.getPlaceholderText())) { super.setText(""); <MASK>super.removeStyleName(this.getPlaceholderStyleName());</MASK> } }"
Inversion-Mutation
megadiff
"public void execute(final StepExecution stepExecution) throws UnexpectedJobExecutionException, JobInterruptedException { ExitStatus status = ExitStatus.FAILED; final ExceptionHolder fatalException = new ExceptionHolder(); try { stepExecution.setStartTime(new Date(System.currentTimeMillis())); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "execute"
"public void execute(final StepExecution stepExecution) throws UnexpectedJobExecutionException, JobInterruptedException { ExitStatus status = ExitStatus.FAILED; final ExceptionHolder fatalException = new ExceptionHolder(); try { stepExecution.setStartTime(new Date(System.currentTimeMillis())); ...
Inversion-Mutation
megadiff
"public StartupPageTemplateHolder getTemplate() throws IOException { readContent(); template.reset(); applyBranding(); addThemeDefinitions(); template.replace( StartupPageTemplateHolder.VAR_LIBRARIES, getJsLibraries() ); template.replace( StartupPageTemplateHolder.VAR_APPSCRIPT, getAppScr...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getTemplate"
"public StartupPageTemplateHolder getTemplate() throws IOException { readContent(); applyBranding(); addThemeDefinitions(); <MASK>template.reset();</MASK> template.replace( StartupPageTemplateHolder.VAR_LIBRARIES, getJsLibraries() ); template.replace( StartupPageTemplateHolder.VAR_APPSCRI...
Inversion-Mutation
megadiff
"@Override public UserDetails loadUserByUsername(String s) throws UsernameNotFoundException, DataAccessException { log.debug("loading username: " + s); CfUser user = null; Session session = sessionFactory.getCurrentSession(); Query query = session.createQuery("select u from CfUs...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "loadUserByUsername"
"@Override public UserDetails loadUserByUsername(String s) throws UsernameNotFoundException, DataAccessException { log.debug("loading username: " + s); CfUser user = null; Session session = sessionFactory.getCurrentSession(); Query query = session.createQuery("select u from CfUs...
Inversion-Mutation
megadiff
"private Diff(ArgList argList) throws IOException { this( JenaConnect.parseConfig(argList.get("m"), argList.getValueMap("M")), JenaConnect.parseConfig(argList.get("s"), argList.getValueMap("S")), JenaConnect.parseConfig(argList.get("o"), argList.getValueMap("O")), argList.get("d") ); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "Diff"
"private Diff(ArgList argList) throws IOException { this( <MASK>JenaConnect.parseConfig(argList.get("s"), argList.getValueMap("S")),</MASK> JenaConnect.parseConfig(argList.get("m"), argList.getValueMap("M")), JenaConnect.parseConfig(argList.get("o"), argList.getValueMap("O")), argList.get("d") ...
Inversion-Mutation
megadiff
"private int readMessages(ClientSession session, ClientConsumer consumer, SimpleString queue) throws MessagingException { session.start(); int msgs = 0; ClientMessage msg = null; do { msg = consumer.receive(1000); if (msg != null) { ms...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "readMessages"
"private int readMessages(ClientSession session, ClientConsumer consumer, SimpleString queue) throws MessagingException { session.start(); int msgs = 0; ClientMessage msg = null; do { msg = consumer.receive(1000); <MASK>msg.processed();</MASK> if (m...
Inversion-Mutation
megadiff
"@Before public void setUp() { try { testObjects = (HashMap<String, Object>) context.getBean("cancelOrder"); ShoppingCartCustomerEntity customer = (ShoppingCartCustomerEntity) testObjects.get("customer"); List<ShoppingCartCustomerAddressEntity> addresses = (List<ShoppingCartCustomerAddressEntity>)...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setUp"
"@Before public void setUp() { try { testObjects = (HashMap<String, Object>) context.getBean("cancelOrder"); ShoppingCartCustomerEntity customer = (ShoppingCartCustomerEntity) testObjects.get("customer"); List<ShoppingCartCustomerAddressEntity> addresses = (List<ShoppingCartCustomerAddressEntity>)...
Inversion-Mutation
megadiff
"@Override public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) throws Exception { HttpRequest request = (HttpRequest) e.getMessage(); RandomAccessFile raf = null; boolean found = true; File file = null; for (String p : paths) { String pat...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "messageReceived"
"@Override public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) throws Exception { HttpRequest request = (HttpRequest) e.getMessage(); RandomAccessFile raf = null; boolean found = true; File file = null; for (String p : paths) { String pat...
Inversion-Mutation
megadiff
"public frmConfiguration() { aloader = Main.getInstance().emuConfig; initComponents(); this.setLocationRelativeTo(null); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "frmConfiguration"
"public frmConfiguration() { <MASK>initComponents();</MASK> aloader = Main.getInstance().emuConfig; this.setLocationRelativeTo(null); }"
Inversion-Mutation
megadiff
"@Override protected void onCreate(Bundle savedInstanceState) { Components.onCreateActivity(this, 0); super.onCreate(savedInstanceState); // Drug drug = (Drug) getIntent().getSerializableExtra(Extras.DRUG); mDrug = Drug.get(getIntent().getIntExtra(Extras.DRUG_ID, 0)); setTitle(mDrug.getName()); ...
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) { <MASK>super.onCreate(savedInstanceState);</MASK> Components.onCreateActivity(this, 0); // Drug drug = (Drug) getIntent().getSerializableExtra(Extras.DRUG); mDrug = Drug.get(getIntent().getIntExtra(Extras.DRUG_ID, 0)); setTitle(mDrug...
Inversion-Mutation
megadiff
"public void initializeCompiler() { if (!initialized) { URL[] urls = ClasspathUrlFinder.findClassPaths(); ModuleUtils.initializeScannerURLs(urls); ClassScanner.initialize(urls); initializeProcessors(); for (CruxPreProcessor preprocess : this.preProcessors) { preprocess.initialize(...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "initializeCompiler"
"public void initializeCompiler() { if (!initialized) { URL[] urls = ClasspathUrlFinder.findClassPaths(); ModuleUtils.initializeScannerURLs(urls); ClassScanner.initialize(urls); for (CruxPreProcessor preprocess : this.preProcessors) { preprocess.initialize(urls); } for (CruxP...
Inversion-Mutation
megadiff
"void validatePrediction(MatrixFactorizationModel model, int users, int products, int features, DoubleMatrix trueRatings, double matchThreshold, boolean implicitPrefs, DoubleMatrix truePrefs) { DoubleMatrix predictedU = new DoubleMatrix(users, features); List<scala.Tuple2<Object, double[]>> userFeatur...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "validatePrediction"
"void validatePrediction(MatrixFactorizationModel model, int users, int products, int features, DoubleMatrix trueRatings, double matchThreshold, boolean implicitPrefs, DoubleMatrix truePrefs) { DoubleMatrix predictedU = new DoubleMatrix(users, features); List<scala.Tuple2<Object, double[]>> userFeatur...
Inversion-Mutation
megadiff
"protected void createContext(AppSettings settings) throws LWJGLException{ DisplayMode displayMode = null; if (settings.getWidth() <= 0 || settings.getHeight() <= 0){ displayMode = Display.getDesktopDisplayMode(); settings.setResolution(displayMode.getWidth(), displayMode.get...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createContext"
"protected void createContext(AppSettings settings) throws LWJGLException{ DisplayMode displayMode = null; if (settings.getWidth() <= 0 || settings.getHeight() <= 0){ displayMode = Display.getDesktopDisplayMode(); settings.setResolution(displayMode.getWidth(), displayMode.get...
Inversion-Mutation
megadiff
"public static List<String> getMatchingURIs(Resource current, String namespace, List<Property> properties, JenaConnect vivo) { StringBuilder sbQuery = new StringBuilder(); ArrayList<String> filters = new ArrayList<String>(); int valueCount = 0; sbQuery.append("SELECT ?uri\nWHERE\n{"); for(Property p : pr...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getMatchingURIs"
"public static List<String> getMatchingURIs(Resource current, String namespace, List<Property> properties, JenaConnect vivo) { StringBuilder sbQuery = new StringBuilder(); ArrayList<String> filters = new ArrayList<String>(); int valueCount = 0; sbQuery.append("SELECT ?uri\nWHERE\n{"); for(Property p : pr...
Inversion-Mutation
megadiff
"private void initSuggest() { String locale = mSubtypeSwitcher.getInputLocaleStr(); Locale savedLocale = mSubtypeSwitcher.changeSystemLocale(new Locale(locale)); if (mSuggest != null) { mSuggest.close(); } final SharedPreferences prefs = mPrefs; mQui...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "initSuggest"
"private void initSuggest() { <MASK>updateAutoTextEnabled();</MASK> String locale = mSubtypeSwitcher.getInputLocaleStr(); Locale savedLocale = mSubtypeSwitcher.changeSystemLocale(new Locale(locale)); if (mSuggest != null) { mSuggest.close(); } final S...
Inversion-Mutation
megadiff
"public void onEnable(){ getServer().getPluginManager().registerEvent(Type.PLAYER_CHAT, new ChatListen(this), Priority.Normal, this); setupSQL(); if (!setupPermissions()) return; if (!checkRedeemType()) return; send("is now enabled, version: "+this.getDescription().getVersion()); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onEnable"
"public void onEnable(){ getServer().getPluginManager().registerEvent(Type.PLAYER_CHAT, new ChatListen(this), Priority.Normal, this); if (!setupPermissions()) return; if (!checkRedeemType()) return; <MASK>setupSQL();</MASK> send("is now enabled, version: "+this.getDescription().getVersion()); }"
Inversion-Mutation
megadiff
"protected void scanPIData(String target, XMLString data) throws IOException, XNIException { // check target if (target.length() == 3) { char c0 = Character.toLowerCase(target.charAt(0)); char c1 = Character.toLowerCase(target.charAt(1)); char c2 = Ch...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "scanPIData"
"protected void scanPIData(String target, XMLString data) throws IOException, XNIException { // check target if (target.length() == 3) { char c0 = Character.toLowerCase(target.charAt(0)); char c1 = Character.toLowerCase(target.charAt(1)); char c2 = Ch...
Inversion-Mutation
megadiff
"@Override public MRSEncounter createEncounter(MRSEncounter mrsEncounter) { Encounter existingOpenMrsEncounter = findDuplicateOpenMrsEncounter(mrsEncounter); if (existingOpenMrsEncounter == null) { return openmrsToMrsEncounter(encounterService.saveEncounter(mrsToOpenMRSEncounter(mrsE...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createEncounter"
"@Override public MRSEncounter createEncounter(MRSEncounter mrsEncounter) { Encounter existingOpenMrsEncounter = findDuplicateOpenMrsEncounter(mrsEncounter); if (existingOpenMrsEncounter == null) { return openmrsToMrsEncounter(encounterService.saveEncounter(mrsToOpenMRSEncounter(mrsE...
Inversion-Mutation
megadiff
"private void delayedCleanupAfterDisconnect() { if (VDBG) log("delayedCleanupAfterDisconnect()... Phone state = " + mCM.getState()); // Clean up any connections in the DISCONNECTED state. // // [Background: Even after a connection gets disconnected, its // Connection obje...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "delayedCleanupAfterDisconnect"
"private void delayedCleanupAfterDisconnect() { if (VDBG) log("delayedCleanupAfterDisconnect()... Phone state = " + mCM.getState()); // Clean up any connections in the DISCONNECTED state. // // [Background: Even after a connection gets disconnected, its // Connection obje...
Inversion-Mutation
megadiff
"public void start() { if (stopped || getState() == ProjectState.STOPPED) { stopped = false; LOG.info("Project " + name + " starting"); setState(ProjectState.IDLE); createNewSchedulingThread(); } }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "start"
"public void start() { if (stopped || getState() == ProjectState.STOPPED) { stopped = false; <MASK>createNewSchedulingThread();</MASK> LOG.info("Project " + name + " starting"); setState(ProjectState.IDLE); } }"
Inversion-Mutation
megadiff
"public static <T extends JPASupport> T edit(Object o, String name, Map<String, String[]> params) { try { BeanWrapper bw = new BeanWrapper(o.getClass()); // Start with relations Set<Field> fields = new HashSet<Field>(); Class clazz = o.getClass(); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "edit"
"public static <T extends JPASupport> T edit(Object o, String name, Map<String, String[]> params) { try { BeanWrapper bw = new BeanWrapper(o.getClass()); // Start with relations Set<Field> fields = new HashSet<Field>(); Class clazz = o.getClass(); ...
Inversion-Mutation
megadiff
"public void closeColonyPanel() { if (getColony().getUnitCount() == 0) { if (getCanvas().showConfirmDialog("abandonColony.text", "abandonColony.yes", "abandonColony.no")) { getCanvas().r...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "closeColonyPanel"
"public void closeColonyPanel() { if (getColony().getUnitCount() == 0) { if (getCanvas().showConfirmDialog("abandonColony.text", "abandonColony.yes", "abandonColony.no")) { <MASK>getContr...
Inversion-Mutation
megadiff
"protected int computeAdornmentFlags(Object obj) { try { if (obj instanceof IModelElement) { IModelElement element= (IModelElement) obj; int type= element.getElementType(); switch (type) { case IModelElement.SCRIPT_MODEL: case IModelElement.SCRIPT_PROJECT: case IModelElement.PROJ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "computeAdornmentFlags"
"protected int computeAdornmentFlags(Object obj) { try { if (obj instanceof IModelElement) { IModelElement element= (IModelElement) obj; int type= element.getElementType(); switch (type) { case IModelElement.SCRIPT_MODEL: case IModelElement.SCRIPT_PROJECT: case IModelElement.PROJ...
Inversion-Mutation
megadiff
"public void testReaderOperation() { Charset utf8 = Charset.forName("UTF-8"); byte[] mime = new String("--BOUNDARY\r\nFoo: Bar\r\n Header : Val ue \r\n\r\npart the first\r\n--BOUNDARY \r\n\r\n2nd part\r\n--BOUNDARY--").getBytes(utf8); for (int chunkSize=1; chunkSize <= mime.length; ++...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "testReaderOperation"
"public void testReaderOperation() { Charset utf8 = Charset.forName("UTF-8"); byte[] mime = new String("--BOUNDARY\r\nFoo: Bar\r\n Header : Val ue \r\n\r\npart the first\r\n--BOUNDARY \r\n\r\n2nd part\r\n--BOUNDARY--").getBytes(utf8); <MASK>ByteArrayInputStream mimeInputStream = new Byte...
Inversion-Mutation
megadiff
"public static void main(final String[] args) { Tools.init(); final JFrame mainFrame = new JFrame( Tools.getString("DrbdMC.Title") + " " + Tools.getRelease()); final List<Image> il = new ArrayList<Image>(); for (final String iconS : new String[]{"LCMC.AppIcon32", ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "main"
"public static void main(final String[] args) { Tools.init(); final JFrame mainFrame = new JFrame( Tools.getString("DrbdMC.Title") + " " + Tools.getRelease()); final List<Image> il = new ArrayList<Image>(); for (final String iconS : new String[]{"LCMC.AppIcon32", ...
Inversion-Mutation
megadiff
"private void handleExecUrl(String url) { int idx1 = CORDOVA_EXEC_URL_PREFIX.length(); int idx2 = url.indexOf('#', idx1 + 1); int idx3 = url.indexOf('#', idx2 + 1); int idx4 = url.indexOf('#', idx3 + 1); if (idx1 == -1 || idx2 == -1 || idx3 == -1 || idx4 == -1) { Log.e(TAG, "Could not decode URL comm...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "handleExecUrl"
"private void handleExecUrl(String url) { int idx1 = CORDOVA_EXEC_URL_PREFIX.length(); int idx2 = url.indexOf('#', idx1 + 1); int idx3 = url.indexOf('#', idx2 + 1); int idx4 = url.indexOf('#', idx3 + 1); if (idx1 == -1 || idx2 == -1 || idx3 == -1 || idx4 == -1) { Log.e(TAG, "Could not decode URL comm...
Inversion-Mutation
megadiff
"public synchronized Object getConnectionHandle(boolean recycle) throws Exception { if (failed) { try { if (log.isDebugEnabled()) log.debug("resource '" + bean.getUniqueName() + "' is marked as failed, resetting and recovering it before trying connection acquisition"); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getConnectionHandle"
"public synchronized Object getConnectionHandle(boolean recycle) throws Exception { if (failed) { try { if (log.isDebugEnabled()) log.debug("resource '" + bean.getUniqueName() + "' is marked as failed, resetting and recovering it before trying connection acquisition"); ...
Inversion-Mutation
megadiff
"public FitSphere(final Vector3D[] points) { Vector3D mean = Vector3D.ZERO; for(Vector3D point : points) mean = mean.add(point.scalarMultiply(1D/(double)points.length)); ReportingUtils.logMessage("MEAN: " + mean.toString()); final Vector3D endMean = new Vector3D(mean.getX(), mean.getY(), mean.getZ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "FitSphere"
"public FitSphere(final Vector3D[] points) { Vector3D mean = Vector3D.ZERO; for(Vector3D point : points) mean = mean.add(point.scalarMultiply(1D/(double)points.length)); ReportingUtils.logMessage("MEAN: " + mean.toString()); final Vector3D endMean = new Vector3D(mean.getX(), mean.getY(), mean.getZ...
Inversion-Mutation
megadiff
"public boolean checkPolicyUpdate(ContentObject co) throws RepositoryException { if (_info.getPolicyName().isPrefixOf(co.name())) { ByteArrayInputStream bais = new ByteArrayInputStream(co.content()); try { if (_policy.update(bais, true)) { ContentName policyName = VersioningProfile.addVersion(...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "checkPolicyUpdate"
"public boolean checkPolicyUpdate(ContentObject co) throws RepositoryException { if (_info.getPolicyName().isPrefixOf(co.name())) { ByteArrayInputStream bais = new ByteArrayInputStream(co.content()); try { if (_policy.update(bais, true)) { ContentName policyName = VersioningProfile.addVersion(...
Inversion-Mutation
megadiff
"private void search(HttpServletRequest request, ModelAndView next, WikiPageInfo pageInfo) throws Exception { String virtualWiki = pageInfo.getVirtualWikiName(); String searchField = request.getParameter("text"); if (request.getParameter("text") == null) { pageInfo.setPageTitle(new WikiMessage("search.titl...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "search"
"private void search(HttpServletRequest request, ModelAndView next, WikiPageInfo pageInfo) throws Exception { String virtualWiki = pageInfo.getVirtualWikiName(); String searchField = request.getParameter("text"); if (request.getParameter("text") == null) { pageInfo.setPageTitle(new WikiMessage("search.titl...
Inversion-Mutation
megadiff
"@Test public void hybridFilter() { bytesIn = 0; final int messageSize = 1000; IOConnector<SocketAddress> connector = new SocketEndpoint(BIND_ADDRESS, TransportType.RELIABLE, Executors.newCachedThreadPool()).createConnector(); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "hybridFilter"
"@Test public void hybridFilter() { bytesIn = 0; final int messageSize = 1000; IOConnector<SocketAddress> connector = new SocketEndpoint(BIND_ADDRESS, TransportType.RELIABLE, Executors.newCachedThreadPool()).createConnector(); ...
Inversion-Mutation
megadiff
"public void bytesReceived(byte[] buffer, IOHandle handle) { bytesIn += buffer.length; System.err.println("Got " + buffer.length + " bytes, total = " + bytesIn); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "bytesReceived"
"public void bytesReceived(byte[] buffer, IOHandle handle) { System.err.println("Got " + buffer.length + " bytes, total = " + bytesIn); <MASK>bytesIn += buffer.length;</MASK> }"
Inversion-Mutation
megadiff
"private void showMessage(int typingOption, final Message message) { if (message != null) { int currentUid = getSharedPreferences(PREFS_NAME, 0).getInt("currentUid", 0); boolean isNewMessage = message.uid != currentUid; Log.v(TAG, "Saving new currentUid = " + message.uid); getSharedPreferences(PREFS_...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "showMessage"
"private void showMessage(int typingOption, final Message message) { if (message != null) { int currentUid = getSharedPreferences(PREFS_NAME, 0).getInt("currentUid", 0); boolean isNewMessage = message.uid != currentUid; Log.v(TAG, "Saving new currentUid = " + message.uid); getSharedPreferences(PREFS_...
Inversion-Mutation
megadiff
"@Override public void run() { // skip insides of HTML tags if (index < str.length() && str.charAt(index) == '<') { int closingIndex = str.indexOf('>', index); if (closingIndex > index) index = closingIndex; } // TODO: use text adding instead of setting, then a...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run"
"@Override public void run() { // skip insides of HTML tags if (index < str.length() && str.charAt(index) == '<') { int closingIndex = str.indexOf('>', index); if (closingIndex > index) index = closingIndex; } // TODO: use text adding instead of setting, then a...
Inversion-Mutation
megadiff
"protected Runnable getAsyncWriteHandler() { return new Runnable() { public void run() { AsyncWriteToken token = null; try { token = asyncWriteQueue.poll(5, TimeUnit.SECONDS); if (token == null) { ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getAsyncWriteHandler"
"protected Runnable getAsyncWriteHandler() { return new Runnable() { public void run() { AsyncWriteToken token = null; try { token = asyncWriteQueue.poll(5, TimeUnit.SECONDS); if (token == null) { ...
Inversion-Mutation
megadiff
"public void run() { AsyncWriteToken token = null; try { token = asyncWriteQueue.poll(5, TimeUnit.SECONDS); if (token == null) { if (!destroyed.get()) bc.getAsyncWriteService().submit(this); ret...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run"
"public void run() { AsyncWriteToken token = null; try { token = asyncWriteQueue.poll(5, TimeUnit.SECONDS); if (token == null) { if (!destroyed.get()) bc.getAsyncWriteService().submit(this); ret...
Inversion-Mutation
megadiff
"public void testServerStartup() throws Exception { String myName = toString(); boolean serverCameUp = serverCameUp(); String serverOutput = getServerOutput(); boolean outputOK = ( serverOutput.indexOf( _outcome.expectedServerOutput() ) >= 0 ); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "testServerStartup"
"public void testServerStartup() throws Exception { String myName = toString(); <MASK>String serverOutput = getServerOutput();</MASK> boolean serverCameUp = serverCameUp(); boolean outputOK = ( serverOutput.indexOf( _outcome.expectedServerOutput() ) ...
Inversion-Mutation
megadiff
"public void execute() throws MojoExecutionException, MojoFailureException { logGroovyVersion("console"); try { // get classes we need with reflection Class consoleClass = Class.forName("groovy.ui.Console"); Class bindingClass = Class.forName("groovy.lang.Bindi...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "execute"
"public void execute() throws MojoExecutionException, MojoFailureException { logGroovyVersion("console"); try { // get classes we need with reflection Class consoleClass = Class.forName("groovy.ui.Console"); Class bindingClass = Class.forName("groovy.lang.Bindi...
Inversion-Mutation
megadiff
"private void makeKnownIdentitiesList(OwnIdentity treeOwner) throws DuplicateScoreException, DuplicateTrustException { String nickFilter = request.getPartAsStringFailsafe("nickfilter", 100).trim(); String sortBy = request.isPartSet("sortby") ? request.getPartAsStringFailsafe("sortby", 100).trim() : "Nickname"; ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "makeKnownIdentitiesList"
"private void makeKnownIdentitiesList(OwnIdentity treeOwner) throws DuplicateScoreException, DuplicateTrustException { String nickFilter = request.getPartAsStringFailsafe("nickfilter", 100).trim(); String sortBy = request.isPartSet("sortby") ? request.getPartAsStringFailsafe("sortby", 100).trim() : "Nickname"; ...
Inversion-Mutation
megadiff
"public void setVoiceInput(VoiceInput voiceInput, SubtypeSwitcher switcher) { if (mVoiceInput == null && voiceInput != null) { mVoiceInput = voiceInput; } switcher.setVoiceInputConnector(this); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setVoiceInput"
"public void setVoiceInput(VoiceInput voiceInput, SubtypeSwitcher switcher) { if (mVoiceInput == null && voiceInput != null) { mVoiceInput = voiceInput; <MASK>switcher.setVoiceInputConnector(this);</MASK> } }"
Inversion-Mutation
megadiff
"private void attachListeners() { this.boardView.setBoardViewListener(new BoardViewListener() { @Override public void onConfigChange(String command, String value) { Log.d("monopd", "BoardView tapped config change " + command + " = " + value); Bundle...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "attachListeners"
"private void attachListeners() { this.boardView.setBoardViewListener(new BoardViewListener() { @Override public void onConfigChange(String command, String value) { Log.d("monopd", "BoardView tapped config change " + command + " = " + value); Bundle...
Inversion-Mutation
megadiff
"@Override public void onGameUpdate(final int gameId, final String status) { Log.v("monopd", "net: Received onGameUpdate() from MonoProtocolHandler"); BoardActivity.this.runOnUiThread(new Runnable() { @Override public void run() ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onGameUpdate"
"@Override public void onGameUpdate(final int gameId, final String status) { Log.v("monopd", "net: Received onGameUpdate() from MonoProtocolHandler"); BoardActivity.this.runOnUiThread(new Runnable() { @Override public void run() ...
Inversion-Mutation
megadiff
"@Override public void run() { if (gameId > 0) { gameItem.setGameId(gameId); } BoardActivity.this.status = GameStatus.fromString(status); BoardA...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run"
"@Override public void run() { if (gameId > 0) { gameItem.setGameId(gameId); } BoardActivity.this.status = GameStatus.fromString(status); BoardA...
Inversion-Mutation
megadiff
"public boolean readRecord(PactRecord target, byte[] bytes, int offset, int numBytes) { PactString str = this.theString; if (this.ascii) { str.setValueAscii(bytes, offset, numBytes); } else { ByteBuffer byteWrapper = this.byteWrapper; if (bytes != byteWrapper.array()) { byteWrapper = By...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "readRecord"
"public boolean readRecord(PactRecord target, byte[] bytes, int offset, int numBytes) { PactString str = this.theString; if (this.ascii) { str.setValueAscii(bytes, offset, numBytes); } else { ByteBuffer byteWrapper = this.byteWrapper; if (bytes != byteWrapper.array()) { byteWrapper = By...
Inversion-Mutation
megadiff
"public Module(ModuleView view, ModuleConfiguration moduleConfiguration) { this.identifier = moduleConfiguration.getBaseIdentifier(); this.view = view; this.properties = new ModuleProperties(this); inputConnectedPoints = new ObservableList<>(this); outputConnectedPoints = ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "Module"
"public Module(ModuleView view, ModuleConfiguration moduleConfiguration) { this.identifier = moduleConfiguration.getBaseIdentifier(); this.view = view; this.properties = new ModuleProperties(this); inputConnectedPoints = new ObservableList<>(this); outputConnectedPoints = ...
Inversion-Mutation
megadiff
"public static void main(String[] args) { // Configurable params int nrChiefs = 1; int nrTeams = 5; int nrThievesPerTeam = 3; int nrTotalThieves = 7; int nrRooms = 5; int maxDistanceBetweenThieves = 1; int maxDistanceBetweenRoomAndOutside = 10; ...
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) { // Configurable params int nrChiefs = 1; int nrTeams = 5; int nrThievesPerTeam = 3; int nrTotalThieves = 7; int nrRooms = 5; int maxDistanceBetweenThieves = 1; int maxDistanceBetweenRoomAndOutside = 10; ...
Inversion-Mutation
megadiff
"boolean save() { createHandler(); String title = mTitle.getText().toString().trim(); String unfilteredUrl; if (mIsUrlEditable) { unfilteredUrl = BrowserActivity.fixUrl(mAddress.getText().toString()); } else { unfilteredUrl = ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "save"
"boolean save() { createHandler(); String title = mTitle.getText().toString().trim(); String unfilteredUrl; if (mIsUrlEditable) { unfilteredUrl = BrowserActivity.fixUrl(mAddress.getText().toString()); } else { unfilteredUrl = ...
Inversion-Mutation
megadiff
"@Override public void run() { boolean closed = false; String packet; try { mock.waitForStartup(); String http = "" + mock.getHttpPort() + '\0'; output.write(http.getBytes()); output.flush(); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run"
"@Override public void run() { boolean closed = false; String packet; <MASK>String http = "" + mock.getHttpPort() + '\0';</MASK> try { mock.waitForStartup(); output.write(http.getBytes()); output.flush(); ...
Inversion-Mutation
megadiff
"private void showPreviews(final View anchor, int start, int end) { //check first if it's already open final PopupWindow window = (PopupWindow) anchor.getTag(); if (window != null) return; Resources resources = getResources(); Workspace workspace = mWorkspace; CellL...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "showPreviews"
"private void showPreviews(final View anchor, int start, int end) { //check first if it's already open final PopupWindow window = (PopupWindow) anchor.getTag(); if (window != null) return; <MASK>showingPreviews=true;</MASK> Resources resources = getResources(); Works...
Inversion-Mutation
megadiff
"@Test public void test() { boolean staticSet = false; ORB myORB = null; RootOA myOA = null; Map<String, String> properties = opPropertyManager.getOrbPortabilityEnvironmentBean().getOrbInitializationProperties(); properties.put( PostInitLoader.generateORBProper...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "test"
"@Test public void test() { boolean staticSet = false; ORB myORB = null; RootOA myOA = null; Map<String, String> properties = opPropertyManager.getOrbPortabilityEnvironmentBean().getOrbInitializationProperties(); properties.put( PostInitLoader.generateORBProper...
Inversion-Mutation
megadiff
"@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.tymy_list); app = (TymyReader) getApplication(); tlu = new TymyListUtil(); pb = (ProgressBar) findViewById(R.id.progress_bar); TymyListActivity oldState = (TymyListActivity...
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); setContentView(R.layout.tymy_list); app = (TymyReader) getApplication(); tlu = new TymyListUtil(); TymyListActivity oldState = (TymyListActivity) getLastNonConfigurationInstance(); if (oldState =...
Inversion-Mutation
megadiff
"@Override public boolean onCommand(CommandSender sender, Command cmnd, String label, String[] args) { if (!(sender instanceof Player)) { return true; } if (!sender.hasPermission("authme." + label.toLowerCase())) { sender.sendMessage(m._("no_perm")); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onCommand"
"@Override public boolean onCommand(CommandSender sender, Command cmnd, String label, String[] args) { if (!(sender instanceof Player)) { return true; } if (!sender.hasPermission("authme." + label.toLowerCase())) { sender.sendMessage(m._("no_perm")); ...
Inversion-Mutation
megadiff
"@Override public IEnergyNetwork merge(IEnergyNetwork network) { IEnergyNetwork newNetwork = super.merge(network); if (newNetwork != null) { long newBuffer = getBuffer() + ((EnergyNetwork) network).getBuffer(); newNetwork.setBuffer(newBuffer); return newNetwork; } return null; }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "merge"
"@Override public IEnergyNetwork merge(IEnergyNetwork network) { <MASK>long newBuffer = getBuffer() + ((EnergyNetwork) network).getBuffer();</MASK> IEnergyNetwork newNetwork = super.merge(network); if (newNetwork != null) { newNetwork.setBuffer(newBuffer); return newNetwork; } return ...
Inversion-Mutation
megadiff
"public Table addRemoteTable(String remoteSchema, String remoteTableName, String baseSchema, Properties properties, Pattern excludeIndirectColumns, Pattern excludeColumns) throws SQLException { String fullName = remoteSchema + "." + remoteTableName; Table remoteTable = remoteTables.get(fullName); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "addRemoteTable"
"public Table addRemoteTable(String remoteSchema, String remoteTableName, String baseSchema, Properties properties, Pattern excludeIndirectColumns, Pattern excludeColumns) throws SQLException { String fullName = remoteSchema + "." + remoteTableName; Table remoteTable = remoteTables.get(fullName); ...
Inversion-Mutation
megadiff
"public reportHTML (HashMap<BlackboardArtifact,ArrayList<BlackboardAttribute>> report){ try{ Case currentCase = Case.getCurrentCase(); // get the most updated case SleuthkitCase skCase = currentCase.getSleuthkitCase(); String caseName = curr...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "reportHTML"
"public reportHTML (HashMap<BlackboardArtifact,ArrayList<BlackboardAttribute>> report){ try{ Case currentCase = Case.getCurrentCase(); // get the most updated case SleuthkitCase skCase = currentCase.getSleuthkitCase(); String caseName = curr...
Inversion-Mutation
megadiff
"public void navigateAndInitiateEmergencyRnr(String program) { navigateRnr(); myFacilityRadioButton.click(); testWebDriver.sleep(1000); testWebDriver.waitForElementToAppear(programDropDown); testWebDriver.selectByVisibleText(rnrTypeSelectBox, "Emergency"); testWebDriver.selectByVisibleTex...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "navigateAndInitiateEmergencyRnr"
"public void navigateAndInitiateEmergencyRnr(String program) { navigateRnr(); myFacilityRadioButton.click(); testWebDriver.sleep(1000); testWebDriver.waitForElementToAppear(programDropDown); <MASK>testWebDriver.selectByVisibleText(programDropDown, program);</MASK> testWebDriver.selectByVis...
Inversion-Mutation
megadiff
"@Override public void onPause() { Log.d("GeoBeagle", "GeoBeagle onPause"); mGeoBeagleDelegate.onPause(); super.onPause(); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onPause"
"@Override public void onPause() { <MASK>super.onPause();</MASK> Log.d("GeoBeagle", "GeoBeagle onPause"); mGeoBeagleDelegate.onPause(); }"
Inversion-Mutation
megadiff
"public static SimpleTweet generateSimpleTweet(Status status){ SimpleTweet simpleTweet = initializeSimpleTweet(); try{ /*Setting contributors in SimpleTweet*/ ArrayList<Long> contributors = new ArrayList<Long>(); for (long contributor : status.getContributors()) ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "generateSimpleTweet"
"public static SimpleTweet generateSimpleTweet(Status status){ SimpleTweet simpleTweet = initializeSimpleTweet(); try{ /*Setting contributors in SimpleTweet*/ ArrayList<Long> contributors = new ArrayList<Long>(); for (long contributor : status.getContributors()) ...
Inversion-Mutation
megadiff
"@Override public void onEnable() { instance = this; configManager = new ConfigManager(); groupMediator = new GroupMediator(); jaLogger = new JukeAlertLogger(); snitchManager = new SnitchManager(); registerEvents(); registerCommands(); snitchManager.loadSnitches(); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onEnable"
"@Override public void onEnable() { instance = this; configManager = new ConfigManager(); jaLogger = new JukeAlertLogger(); snitchManager = new SnitchManager(); <MASK>groupMediator = new GroupMediator();</MASK> registerEvents(); registerCommands(); snitchManager.loadSnitches(); }"
Inversion-Mutation
megadiff
"Dialog createDialog() { final View layout = View.inflate(Launcher.this, R.layout.rename_folder, null); mInput = (EditText) layout.findViewById(R.id.folder_name); AlertDialog.Builder builder = new AlertDialog.Builder(Launcher.this); builder.setIcon(0); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createDialog"
"Dialog createDialog() { <MASK>mWaitingForResult = true;</MASK> final View layout = View.inflate(Launcher.this, R.layout.rename_folder, null); mInput = (EditText) layout.findViewById(R.id.folder_name); AlertDialog.Builder builder = new AlertDialog.Builder(Launcher.t...
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
"@Override protected void hideFakeTitleBar() { if (isFakeTitleBarShowing()) { mFakeTitleBar.setEditMode(false); mTabBar.onHideTitleBar(); mContentView.removeView(mFakeTitleBar); } }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "hideFakeTitleBar"
"@Override protected void hideFakeTitleBar() { if (isFakeTitleBarShowing()) { mFakeTitleBar.setEditMode(false); <MASK>mContentView.removeView(mFakeTitleBar);</MASK> mTabBar.onHideTitleBar(); } }"
Inversion-Mutation
megadiff
"public GenericJDBCDataModel(Properties props) throws TasteException { super(AbstractJDBCComponent.lookupDataSource(props.getProperty(DATA_SOURCE_KEY)), props.getProperty(GET_PREFERENCE_SQL_KEY), props.getProperty(GET_PREFERENCE_TIME_SQL_KEY), props.getProperty(GET_USER_SQL_KEY), ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "GenericJDBCDataModel"
"public GenericJDBCDataModel(Properties props) throws TasteException { super(AbstractJDBCComponent.lookupDataSource(props.getProperty(DATA_SOURCE_KEY)), props.getProperty(GET_PREFERENCE_SQL_KEY), props.getProperty(GET_PREFERENCE_TIME_SQL_KEY), props.getProperty(GET_USER_SQL_KEY), ...
Inversion-Mutation
megadiff
"public FitSphere(final Vector3D[] points) { Vector3D mean = Vector3D.ZERO; for(Vector3D point : points) mean = mean.add(point.scalarMultiply(1D/(double)points.length)); ReportingUtils.logMessage("MEAN: " + mean.toString()); final Vector3D endMean = new Vector3D(mean.getX(), mean.getY(), mean.getZ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "FitSphere"
"public FitSphere(final Vector3D[] points) { Vector3D mean = Vector3D.ZERO; for(Vector3D point : points) mean = mean.add(point.scalarMultiply(1D/(double)points.length)); ReportingUtils.logMessage("MEAN: " + mean.toString()); final Vector3D endMean = new Vector3D(mean.getX(), mean.getY(), mean.getZ...
Inversion-Mutation
megadiff
"public void draguearElemBarrio(String Elem,int posX, int posY) throws Exception{ if (posX < 0 || posX >= Mapa.tama() || posY < 0 || posY >= Mapa.tamb()){ throw new Exception("\nLa posicion no es correcta.\n"); } Elemento e = DOMElem.getElemento(Elem); int tamX,tamY; ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "draguearElemBarrio"
"public void draguearElemBarrio(String Elem,int posX, int posY) throws Exception{ if (posX < 0 || posX >= Mapa.tama() || posY < 0 || posY >= Mapa.tamb()){ throw new Exception("\nLa posicion no es correcta.\n"); } <MASK>anadirElemBarrio(Elem, 1);</MASK> Elemento e = DOME...
Inversion-Mutation
megadiff
"@Override public void show() { super.show(); stage.addActor(gamebgImage); stage.addActor(borderImage); stage.addActor(pipesImage); stage.addActor(infoPanels); stage.addActor(valve1Image); stage.addActor(valve2Image); stage.addActor(pump1Ima...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "show"
"@Override public void show() { super.show(); stage.addActor(gamebgImage); stage.addActor(borderImage); stage.addActor(pipesImage); stage.addActor(valve1Image); stage.addActor(valve2Image); stage.addActor(pump1Image); stage.addActor(pump2Im...
Inversion-Mutation
megadiff
"private void process(IInvocationContext context, IProblemLocation problem, Collection<IRubyCompletionProposal> proposals) throws CoreException { int id = problem.getProblemId(); if (id == 0) { // no proposals for none-problem locations return; } switch (id) { case IProblem.UnusedPrivateMethod: ca...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "process"
"private void process(IInvocationContext context, IProblemLocation problem, Collection<IRubyCompletionProposal> proposals) throws CoreException { int id = problem.getProblemId(); if (id == 0) { // no proposals for none-problem locations return; } switch (id) { case IProblem.UnusedPrivateMethod: ca...
Inversion-Mutation
megadiff
"@cli.System.Security.SecuritySafeCriticalAttribute.Annotation private void copyToBitmap(int width, int height, int[] pixelData) { long size = (long)width * (long)height; if (size > pixelData.length) { throw new IllegalArgumentException(); } bitmap = c...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "copyToBitmap"
"@cli.System.Security.SecuritySafeCriticalAttribute.Annotation private void copyToBitmap(int width, int height, int[] pixelData) { long size = (long)width * (long)height; if (size > pixelData.length) { throw new IllegalArgumentException(); } synchroni...
Inversion-Mutation
megadiff
"@SuppressWarnings("PMD.ExcessiveMethodLength") @Transactional(rollbackFor = {ConnectionException.class, ValidationException.class }) public void setDataElement(FileColumn fileColumn, CommonDataElement dataElement, Study study, ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setDataElement"
"@SuppressWarnings("PMD.ExcessiveMethodLength") @Transactional(rollbackFor = {ConnectionException.class, ValidationException.class }) public void setDataElement(FileColumn fileColumn, CommonDataElement dataElement, Study study, ...
Inversion-Mutation
megadiff
"public static void getItem(){ if(itemValue == 1){ if(player == 1){ if(player1Health < 3){ player1Health++; } } else{ if(player2Health < 3){ player2Health++; } ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getItem"
"public static void getItem(){ if(itemValue == 1){ if(player == 1){ if(player1Health < 3){ player1Health++; } } else{ if(player2Health < 3){ player2Health++; } ...
Inversion-Mutation
megadiff
"public LdapService newInstance() throws Exception { DirectoryService service = new DefaultDirectoryService(); IntegrationUtils.doDelete( service.getWorkingDirectory() ); service.getChangeLog().setEnabled( true ); service.setShutdownHookEnabled( false ); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "newInstance"
"public LdapService newInstance() throws Exception { DirectoryService service = new DefaultDirectoryService(); IntegrationUtils.doDelete( service.getWorkingDirectory() ); service.getChangeLog().setEnabled( true ); service.setShutdownHookEnabled( false ); ...
Inversion-Mutation
megadiff
"@EventHandler(ignoreCancelled = true, priority = EventPriority.HIGH) public void onPlayerInteract(PlayerInteractEvent event) { if (event.getAction().equals(Action.LEFT_CLICK_BLOCK)) { Player player = event.getPlayer(); ItemStack inHand = event.getItem(); if (inHand ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onPlayerInteract"
"@EventHandler(ignoreCancelled = true, priority = EventPriority.HIGH) public void onPlayerInteract(PlayerInteractEvent event) { if (event.getAction().equals(Action.LEFT_CLICK_BLOCK)) { Player player = event.getPlayer(); ItemStack inHand = event.getItem(); if (inHand ...
Inversion-Mutation
megadiff
"private static Item getItem(SQLiteDatabase db, long id) { Cursor cursor = null; try { cursor = db.query(ItemTable, new String[] { ItemID, ItemImageURL, ItemName, ItemDescription, }, new StringBuilder(ItemID).append(" = ").append(id).toString(), null, null, null, null)...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getItem"
"private static Item getItem(SQLiteDatabase db, long id) { Cursor cursor = null; try { cursor = db.query(ItemTable, new String[] { ItemID, ItemImageURL, ItemName, ItemDescription, }, new StringBuilder(ItemID).append(" = ").append(id).toString(), null, null, null, null)...
Inversion-Mutation
megadiff
"@Override public void setEnabled(final boolean enabled) { triggerList.setEnabled(enabled); add.setEnabled(trigger.getSelectedIndex() != -1); if (trigger.getModel().getSize() > 0 && enabled) { trigger.setEnabled(enabled); } }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setEnabled"
"@Override public void setEnabled(final boolean enabled) { triggerList.setEnabled(enabled); if (trigger.getModel().getSize() > 0 && enabled) { trigger.setEnabled(enabled); <MASK>add.setEnabled(trigger.getSelectedIndex() != -1);</MASK> } }"
Inversion-Mutation
megadiff
"public void handleRefresh() { ProgressDialog.Builder pb = new ProgressDialog.Builder(this); pb.setMessage("Logging In..."); AlertDialog progressDialog = pb.create(); progressDialog.setOwnerActivity(this); progressDialog.show(); try { String username = ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "handleRefresh"
"public void handleRefresh() { ProgressDialog.Builder pb = new ProgressDialog.Builder(this); pb.setMessage("Logging In..."); AlertDialog progressDialog = pb.create(); progressDialog.setOwnerActivity(this); progressDialog.show(); try { String username = ...
Inversion-Mutation
megadiff
"public static void main(String[] args) { // So jung kommen wir nicht mehr zusammen. final CommandLineArguments commandLineArguments = new CommandLineArguments(); final JCommander jCommander = new JCommander(commandLineArguments, args); jCommander.setProgramName("graylog2"); ...
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) { // So jung kommen wir nicht mehr zusammen. final CommandLineArguments commandLineArguments = new CommandLineArguments(); final JCommander jCommander = new JCommander(commandLineArguments, args); jCommander.setProgramName("graylog2"); ...
Inversion-Mutation
megadiff
"public GUIInstallData provide(ResourceManager resourceManager, VariableSubstitutor variableSubstitutor, Properties variables, ClassPathCrawler classPathCrawler, BindeableContainer container) throws Exception { this.resourceManager = resourceManager; this.variableSubstitutor = variableSubstitutor...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "provide"
"public GUIInstallData provide(ResourceManager resourceManager, VariableSubstitutor variableSubstitutor, Properties variables, ClassPathCrawler classPathCrawler, BindeableContainer container) throws Exception { this.resourceManager = resourceManager; this.variableSubstitutor = variableSubstitutor...
Inversion-Mutation
megadiff
"@Override protected void onHandleIntent(Intent intent) { if (intent.getIntExtra(EXTRA_ACTION, 0) == ADD_LOG) { if (intent.hasExtra(EXTRA_APP_ID)) { addLog(intent.getLongExtra(EXTRA_APP_ID, 0), intent.getIntExtra(EXTRA_ALLOW, 0)); } else ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onHandleIntent"
"@Override protected void onHandleIntent(Intent intent) { if (intent.getIntExtra(EXTRA_ACTION, 0) == ADD_LOG) { if (intent.hasExtra(EXTRA_APP_ID)) { addLog(intent.getLongExtra(EXTRA_APP_ID, 0), intent.getIntExtra(EXTRA_ALLOW, 0)); } else ...
Inversion-Mutation
megadiff
"private void displayCardAnswer() { Log.i(AnkiDroidApp.TAG, "displayCardAnswer"); sDisplayAnswer = true; if (mPrefTimer) { mCardTimer.stop(); } String displayString = ""; // If the user wrote an answer if (mPrefWriteAnswers) { ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "displayCardAnswer"
"private void displayCardAnswer() { Log.i(AnkiDroidApp.TAG, "displayCardAnswer"); sDisplayAnswer = true; if (mPrefTimer) { mCardTimer.stop(); } String displayString = ""; // If the user wrote an answer if (mPrefWriteAnswers) { ...
Inversion-Mutation
megadiff
"@Override public void onStart(Intent intent, int startId) { Log.i(TAG, "Called"); // Create some random data AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(this .getApplicationContext()); int[] allWidgetIds = intent .getIntArrayExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS)...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onStart"
"@Override public void onStart(Intent intent, int startId) { Log.i(TAG, "Called"); // Create some random data AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(this .getApplicationContext()); int[] allWidgetIds = intent .getIntArrayExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS)...
Inversion-Mutation
megadiff
"private void fillProjectProperties(IProjectProperties projectProperties, ProjectPropertiesTO to) throws PropertiesException, CoreException { if (to == null) { log.info("Project properties not found. Use default."); } else { final IWorkingSetManager workingSetMan...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "fillProjectProperties"
"private void fillProjectProperties(IProjectProperties projectProperties, ProjectPropertiesTO to) throws PropertiesException, CoreException { if (to == null) { log.info("Project properties not found. Use default."); } else { final IWorkingSetManager workingSetMan...
Inversion-Mutation
megadiff
"@Test public void testAddTwo() { Symbol sym = Symbol.of("HACKEM MUCHE"); ScoredId id1 = new ScoredIdBuilder(42, 3.5).addChannel(sym, Math.PI).build(); ScoredId id2 = new ScoredIdBuilder(38, 2.6).addChannel(sym, Math.E).build(); builder.add(id1); builder.add(id2); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "testAddTwo"
"@Test public void testAddTwo() { Symbol sym = Symbol.of("HACKEM MUCHE"); ScoredId id1 = new ScoredIdBuilder(42, 3.5).addChannel(sym, Math.PI).build(); ScoredId id2 = new ScoredIdBuilder(38, 2.6).addChannel(sym, Math.E).build(); <MASK>assertThat(builder.size(), equalTo(2));</MAS...
Inversion-Mutation
megadiff
"@Test public void testJournalRecords() throws Exception { store1(); _persistit.flush(); final Transaction txn = _persistit.getTransaction(); final Volume volume = _persistit.getVolume(_volumeName); volume.resetHandle(); final JournalManager jman = new Jou...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "testJournalRecords"
"@Test public void testJournalRecords() throws Exception { store1(); _persistit.flush(); final Transaction txn = _persistit.getTransaction(); final Volume volume = _persistit.getVolume(_volumeName); volume.resetHandle(); <MASK>volume.getTree("JournalManagerTe...
Inversion-Mutation
megadiff
"protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { if(serverManager==null) initialize(); revieweeName = req.getParameter("revieweeuser"); String contextString = req.getContextPath(); String pathInfo = req.getPa...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doGet"
"protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { if(serverManager==null) initialize(); revieweeName = req.getParameter("revieweeuser"); String contextString = req.getContextPath(); String pathInfo = req.getPa...
Inversion-Mutation
megadiff
"@TestTargetNew( level = TestLevel.COMPLETE, method = "setDither", args = {boolean.class} ) public void testSetDither() { assertConstantStateNotSet(); assertNull(mDrawableContainer.getCurrent()); mDrawableContainer.setConstantState(mDrawableContainerStat...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "testSetDither"
"@TestTargetNew( level = TestLevel.COMPLETE, method = "setDither", args = {boolean.class} ) public void testSetDither() { assertConstantStateNotSet(); assertNull(mDrawableContainer.getCurrent()); mDrawableContainer.setDither(false); mDrawableCo...
Inversion-Mutation
megadiff
"public void submitJob(final Job job, boolean stageFiles, DtoActionStatus status) throws JobSubmissionException { final String debug_token = "SUBMIT_" + job.getJobname() + ": "; try { int noStageins = 0; if (stageFiles) { final List<Element> stageIns = JsdlHelpers .getStageInElements...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "submitJob"
"public void submitJob(final Job job, boolean stageFiles, DtoActionStatus status) throws JobSubmissionException { final String debug_token = "SUBMIT_" + job.getJobname() + ": "; try { int noStageins = 0; if (stageFiles) { final List<Element> stageIns = JsdlHelpers .getStageInElements...
Inversion-Mutation
megadiff
"public static void exec(int[] rom) { JFrame window = new JFrame(); MakoPanel view = new MakoPanel(rom); window.addKeyListener(view); window.add(view); window.setTitle("Mako"); window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); window.setResizable(false); window.pack(); window.setVi...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "exec"
"public static void exec(int[] rom) { JFrame window = new JFrame(); MakoPanel view = new MakoPanel(rom); window.addKeyListener(view); window.add(view); window.setTitle("Mako"); window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); <MASK>window.pack();</MASK> window.setResizable(false); ...
Inversion-Mutation
megadiff
"protected byte[] makeHeaderBytes(int pl) { ByteBuffer header = ByteBuffer.allocate(HEADER_SIZE); header.put(type); header.putInt(pl); header.putLong(time); header.putLong(seq); return header.array(); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "makeHeaderBytes"
"protected byte[] makeHeaderBytes(int pl) { ByteBuffer header = ByteBuffer.allocate(HEADER_SIZE); header.put(type); header.putInt(pl); <MASK>header.putLong(seq);</MASK> header.putLong(time); return header.array(); }"
Inversion-Mutation
megadiff
"@Override public void createPartControl(final Composite parent) { IContextService service = (IContextService) getSite().getService(IContextService.class); service.activateContext(CONTEXT_ID); parent.setLayout(adjustLayout(new GridLayout(1, false))); Composite row1 = new Com...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createPartControl"
"@Override public void createPartControl(final Composite parent) { IContextService service = (IContextService) getSite().getService(IContextService.class); service.activateContext(CONTEXT_ID); parent.setLayout(adjustLayout(new GridLayout(1, false))); Composite row1 = new Com...
Inversion-Mutation
megadiff
"public void run() { Provisioner provisioner = Accessor.getService(Provisioner.class); while (true) { if (!servicesToProvision.isEmpty()) { LinkedHashSet<SignatureElement> copy ; synchronized (servicesToProvision){ ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run"
"public void run() { Provisioner provisioner = Accessor.getService(Provisioner.class); while (true) { if (!servicesToProvision.isEmpty()) { LinkedHashSet<SignatureElement> copy ; synchronized (servicesToProvision){ ...
Inversion-Mutation
megadiff
"@Override public boolean onContextItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.EditAugment: if (mLongClickingItemId == -1) AugmentEditActivity.startActivity(this, 0, getFFXICharacter(), mPart, mCurrent, -1); else AugmentEditActivity.startActivity(this, 0, getFFXICharact...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onContextItemSelected"
"@Override public boolean onContextItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.EditAugment: if (mLongClickingItemId == -1) AugmentEditActivity.startActivity(this, 0, getFFXICharacter(), mPart, mCurrent, -1); else AugmentEditActivity.startActivity(this, 0, getFFXICharact...
Inversion-Mutation
megadiff
"@Test public void shouldPassWhenStep1AndStep2Completed() { ApplicationContext ctx = createSpringContainer(); AuctionRepository auctionRepository = lookupAuctionRepository(ctx); AuctionService auctionService = lookupAuctionService(ctx); assertEquals(0, auctionService.allRunningAuc...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "shouldPassWhenStep1AndStep2Completed"
"@Test public void shouldPassWhenStep1AndStep2Completed() { ApplicationContext ctx = createSpringContainer(); AuctionRepository auctionRepository = lookupAuctionRepository(ctx); <MASK>AuctionService auctionService = lookupAuctionService(ctx);</MASK> assertEquals(0, auctionService....
Inversion-Mutation
megadiff
"public void init(HighchartConfig config) { HighchartJsOverlay old = jsOverlay; if(old != null) { old.destroy(); } jsOverlay = config.renderTo(getElement()); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "init"
"public void init(HighchartConfig config) { HighchartJsOverlay old = jsOverlay; <MASK>jsOverlay = config.renderTo(getElement());</MASK> if(old != null) { old.destroy(); } }"
Inversion-Mutation
megadiff
"public static void main(String[] argv) { int exitCode = 1; if (!ws.exists()) { ws.mkdir(); } try { logger = LogFormatter.createDuplex(new File(ws, "xpert.log"), Level.INFO); } catch (IOException e) { throw new RuntimeException(e); } String pluginName = "default"; String configFileNa...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "main"
"public static void main(String[] argv) { int exitCode = 1; if (!ws.exists()) { ws.mkdir(); } try { logger = LogFormatter.createDuplex(new File(ws, "xpert.log"), Level.INFO); } catch (IOException e) { throw new RuntimeException(e); } String pluginName = "default"; String configFileNa...