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 renderCSS(ResourceRenderer renderer, String path) throws RenderingException, IOException { Orientation orientation = Orientation.LT; if (path.endsWith("-lt.css")) { path = path.substring(0, path.length() - "-lt.css".length()) + ".css"; } else if (path.endsWith("-rt.css")) { pat...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "renderCSS"
"public void renderCSS(ResourceRenderer renderer, String path) throws RenderingException, IOException { Orientation orientation = Orientation.LT; if (path.endsWith("-lt.css")) { path = path.substring(0, path.length() - "-lt.css".length()) + ".css"; } else if (path.endsWith("-rt.css")) { pat...
Inversion-Mutation
megadiff
"public int delete(String table, String whereClause, String[] whereArgs) throws BPFDBException { PreparedStatement statement = null; try { if (whereClause != null && !whereClause.isEmpty()) { String sql = "DELETE FROM " + table + " WHERE " + whereClause; statement = connection.prepareState...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "delete"
"public int delete(String table, String whereClause, String[] whereArgs) throws BPFDBException { PreparedStatement statement = null; try { if (whereClause != null && !whereClause.isEmpty()) { String sql = "DELETE FROM " + table + " WHERE " + whereClause; if (whereArgs != null) { <MA...
Inversion-Mutation
megadiff
"private final boolean interpretShort(InstructionF99b ins) { int fromPC = iblock.pc; MachineOperandF99b mop1 = (MachineOperandF99b)ins.getOp1(); switch (ins.getInst()) { case Icmp: case Icmp+1: case Icmp+2: case Icmp+3: case Icmp+4: case Icmp+5: case Icmp+6: case Icmp+7: { ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "interpretShort"
"private final boolean interpretShort(InstructionF99b ins) { int fromPC = iblock.pc; MachineOperandF99b mop1 = (MachineOperandF99b)ins.getOp1(); switch (ins.getInst()) { case Icmp: case Icmp+1: case Icmp+2: case Icmp+3: case Icmp+4: case Icmp+5: case Icmp+6: case Icmp+7: { ...
Inversion-Mutation
megadiff
"public static Test suite() { TestSuite suite = new TestSuite("Tests for org.eclipse.xtext.generator.tests"); suite.addTestSuite(org.eclipse.xtext.actions.AntlrParserTest.class); suite.addTestSuite(org.eclipse.xtext.actions.PackratParserTest.class); suite.addTestSuite(org.eclipse.xtext.commo...
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("Tests for org.eclipse.xtext.generator.tests"); suite.addTestSuite(org.eclipse.xtext.actions.AntlrParserTest.class); suite.addTestSuite(org.eclipse.xtext.actions.PackratParserTest.class); suite.addTestSuite(org.eclipse.xtext.commo...
Inversion-Mutation
megadiff
"private void doDownload(final String requestId, final NasProductTemplate template) { if (DownloadManagerDialog.showAskingForUserTitle( CismapBroker.getInstance().getMappingComponent())) { final String jobname = (!DownloadManagerDialog.getJobname().equals("")) ? DownloadMa...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doDownload"
"private void doDownload(final String requestId, final NasProductTemplate template) { if (DownloadManagerDialog.showAskingForUserTitle( CismapBroker.getInstance().getMappingComponent())) { final String jobname = (!DownloadManagerDialog.getJobname().equals("")) ? DownloadMa...
Inversion-Mutation
megadiff
"WebserverGui(Integer port) throws IOException{ setSize(300,150); setTitle(title); setDefaultCloseOperation(EXIT_ON_CLOSE); setVisible(true); addMouseListener(this); if(port != null){ WWWServer.DEF_PORT = port; } (webserverthread = new Thread(web = new WWWServer(variant))).start(); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "WebserverGui"
"WebserverGui(Integer port) throws IOException{ setSize(300,150); setTitle(title); setDefaultCloseOperation(EXIT_ON_CLOSE); setVisible(true); addMouseListener(this); if(port != null){ WWWServer.DEF_PORT = port; } (webserverthread = new Thread(web = new WWWServer(variant))).start(); ...
Inversion-Mutation
megadiff
"private void draw(PaintContext pc, SingleTile t, int w, int xPoints[], int yPoints[], int hl[], int count, byte highlight,boolean ortho /*, byte mode*/) { IntPoint closestP = new IntPoint(); int wClosest = 0; boolean dividedSeg = false; boolean dividedHighlight = true; IntPoint closestDestP = n...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "draw"
"private void draw(PaintContext pc, SingleTile t, int w, int xPoints[], int yPoints[], int hl[], int count, byte highlight,boolean ortho /*, byte mode*/) { IntPoint closestP = new IntPoint(); int wClosest = 0; boolean dividedSeg = false; boolean dividedHighlight = true; IntPoint closestDestP = n...
Inversion-Mutation
megadiff
"protected List<JCStatement> transformIntermediate(Condition condition, java.util.List<Condition> rest) { Cond transformedCond = statementGen().transformCondition(condition, null); JCExpression test = transformedCond.makeTest(); SyntheticName resultVarName = addVarSub...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "transformIntermediate"
"protected List<JCStatement> transformIntermediate(Condition condition, java.util.List<Condition> rest) { Cond transformedCond = statementGen().transformCondition(condition, null); <MASK>SyntheticName resultVarName = addVarSubs(transformedCond);</MASK> JCExpression tes...
Inversion-Mutation
megadiff
"@Transactional @RequestMapping(value="/save", method=RequestMethod.POST) public ModelAndView save(HttpServletRequest request, HttpServletResponse response) throws UnsupportedEncodingException { request.setCharacterEncoding("UTF-8"); response.setCharacterEncoding("UTF-8"); Mod...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "save"
"@Transactional @RequestMapping(value="/save", method=RequestMethod.POST) public ModelAndView save(HttpServletRequest request, HttpServletResponse response) throws UnsupportedEncodingException { request.setCharacterEncoding("UTF-8"); response.setCharacterEncoding("UTF-8"); Mod...
Inversion-Mutation
megadiff
"public synchronized void run() { if (isClose.get()) { return; } if (this.nettyResponseFuture != null && this.nettyResponseFuture.hasExpired()) { log.debug("Request Timeout expired for {}\n", this.nettyResponseFuture); int req...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run"
"public synchronized void run() { if (isClose.get()) { return; } if (this.nettyResponseFuture != null && this.nettyResponseFuture.hasExpired()) { log.debug("Request Timeout expired for {}\n", this.nettyResponseFuture); int req...
Inversion-Mutation
megadiff
"@Override protected IStatus run(IProgressMonitor monitor) { // Generate real-time job IStatus returnStatus = Status.CANCEL_STATUS; this.monitor = monitor; if (this.monitor == null) { this.monitor = new NullProgressMonitor(); } if (realTime && (job == null || job.getResult()==null)) { j...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run"
"@Override protected IStatus run(IProgressMonitor monitor) { // Generate real-time job IStatus returnStatus = Status.CANCEL_STATUS; this.monitor = monitor; if (this.monitor == null) { this.monitor = new NullProgressMonitor(); } <MASK>makeView();</MASK> if (realTime && (job == null || job....
Inversion-Mutation
megadiff
"protected <T, C extends SshAction<T>> T acquire(C connection) { for (int i = 0; i < sshTries; i++) { try { connection.clear(); if (LOG.isDebugEnabled()) LOG.debug(">> ({}) acquiring {}", toString(), connection); T returnVal = connection.create()...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "acquire"
"protected <T, C extends SshAction<T>> T acquire(C connection) { <MASK>String errorMessage = String.format("(%s) error acquiring %s", toString(), connection);</MASK> for (int i = 0; i < sshTries; i++) { try { connection.clear(); if (LOG.isDebugEnabled()) ...
Inversion-Mutation
megadiff
"@Override public void messageReceived( ChannelHandlerContext ctx , DefaultFullHttpRequest request) { System.out.println("[Daemon] Connection started"); String body = request.data().toString(CharsetUtil.UTF_8); try { ...
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 , DefaultFullHttpRequest request) { System.out.println("[Daemon] Connection started"); String body = request.data().toString(CharsetUtil.UTF_8); try { ...
Inversion-Mutation
megadiff
"private String replaceVariables(final String formula, final CidsBean kaBean) { String breadth = (String)kaBean.getProperty("gewaesserbreite_id.name"); final Double bedBreadth = (Double)kaBean.getProperty("sohlenbreite"); final Integer wbType = (Integer)kaBean.getProperty("gewaessertyp_id.val...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "replaceVariables"
"private String replaceVariables(final String formula, final CidsBean kaBean) { String breadth = (String)kaBean.getProperty("gewaesserbreite_id.name"); final Double bedBreadth = (Double)kaBean.getProperty("sohlenbreite"); final Integer wbType = (Integer)kaBean.getProperty("gewaessertyp_id.val...
Inversion-Mutation
megadiff
"PlayerListener(final JavaPlugin plugin) { org.bukkit.plugin.PluginManager pluginManager = plugin.getServer().getPluginManager(); pluginManager.registerEvent(Event.Type.PLAYER_LOGIN, this, Main.getEventPriority("PLAYER_LOGIN"), plugin); pluginManager.registerEvent(Event.Type.PLAYER_...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "PlayerListener"
"PlayerListener(final JavaPlugin plugin) { org.bukkit.plugin.PluginManager pluginManager = plugin.getServer().getPluginManager(); pluginManager.registerEvent(Event.Type.PLAYER_JOIN, this, Main.getEventPriority("PLAYER_JOIN"), plugin); pluginManager.registerEvent(Event.Type.PLAYER_C...
Inversion-Mutation
megadiff
"public void sendQuestion(View v) { // get all necessary fields String category = ((Spinner) findViewById( R.id.category_spinner_question)).getSelectedItem().toString(); Category c = Category.valueOf(category); String solutionText = ((EditText) findViewById( R.id.edit_solution_q)).getText().toStri...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "sendQuestion"
"public void sendQuestion(View v) { // get all necessary fields String category = ((Spinner) findViewById( R.id.category_spinner_question)).getSelectedItem().toString(); Category c = Category.valueOf(category); String solutionText = ((EditText) findViewById( R.id.edit_solution_q)).getText().toStri...
Inversion-Mutation
megadiff
"private void collectStatsImpl(Connection c, long clientHandle, String selector) throws Exception { assert(selector.equals("WAN")); if (m_pendingRequests.size() > MAX_IN_FLIGHT_REQUESTS) { /* * Defensively check for an expired request not caught * by timeout ch...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "collectStatsImpl"
"private void collectStatsImpl(Connection c, long clientHandle, String selector) throws Exception { assert(selector.equals("WAN")); if (m_pendingRequests.size() > MAX_IN_FLIGHT_REQUESTS) { /* * Defensively check for an expired request not caught * by timeout ch...
Inversion-Mutation
megadiff
"public static HashMap<String, String> createEncodings(ArrayList<Trackpoint> points, int level, int step) { StringBuffer encodedPoints = new StringBuffer(); StringBuffer encodedLevels = new StringBuffer(); int counter = 0; int listSize = points.size(); int plat = 0, plng = 0; ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createEncodings"
"public static HashMap<String, String> createEncodings(ArrayList<Trackpoint> points, int level, int step) { StringBuffer encodedPoints = new StringBuffer(); StringBuffer encodedLevels = new StringBuffer(); <MASK>int plat = 0, plng = 0;</MASK> int counter = 0; int listSize = points.size(...
Inversion-Mutation
megadiff
"private static void showHelp(PrepareConfiguration conf, String[] args) { if (conf.hasHelpOption()) { try { conf.showHelp(); } catch (IOException e) { throw new IllegalArgumentException(e); } System.exit(0); } ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "showHelp"
"private static void showHelp(PrepareConfiguration conf, String[] args) { if (conf.hasHelpOption()) { try { conf.showHelp(); } catch (IOException e) { throw new IllegalArgumentException(e); } } <MASK>System.exit(0);</MA...
Inversion-Mutation
megadiff
"public static MediaItem createMediaItemFromUri(Context context, Uri target, int mediaType) { MediaItem item = null; long id = ContentUris.parseId(target); ContentResolver cr = context.getContentResolver(); String whereClause = Images.ImageColumns._ID + "=" + Long.toString(id); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createMediaItemFromUri"
"public static MediaItem createMediaItemFromUri(Context context, Uri target, int mediaType) { MediaItem item = null; long id = ContentUris.parseId(target); ContentResolver cr = context.getContentResolver(); String whereClause = Images.ImageColumns._ID + "=" + Long.toString(id); ...
Inversion-Mutation
megadiff
"@Override public void cleanupInstance() throws Exception { Details details = new Details(exhibitor); if ( !details.isValid() ) { return; } // see http://zookeeper.apache.org/doc/r3.3.3/zookeeperAdmin.html#Ongoing+Data+Directory+Cleanup ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "cleanupInstance"
"@Override public void cleanupInstance() throws Exception { Details details = new Details(exhibitor); if ( !details.isValid() ) { return; } // see http://zookeeper.apache.org/doc/r3.3.3/zookeeperAdmin.html#Ongoing+Data+Directory+Cleanup ...
Inversion-Mutation
megadiff
"@Override protected void doSdpEvent(final SdpPortManagerEvent event) { if (event.getEventType().equals(SdpPortManagerEvent.OFFER_GENERATED) || event.getEventType().equals(SdpPortManagerEvent.ANSWER_GENERATED)) { if (event.isSuccessful()) { try { final byte[] sdp = event.getM...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doSdpEvent"
"@Override protected void doSdpEvent(final SdpPortManagerEvent event) { if (event.getEventType().equals(SdpPortManagerEvent.OFFER_GENERATED) || event.getEventType().equals(SdpPortManagerEvent.ANSWER_GENERATED)) { if (event.isSuccessful()) { try { final byte[] sdp = event.getM...
Inversion-Mutation
megadiff
"private void showNotification(int icon, int icon_level, CharSequence ticker_text, CharSequence content_title, CharSequence content_text, Class<?> activity_class, ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "showNotification"
"private void showNotification(int icon, int icon_level, CharSequence ticker_text, CharSequence content_title, CharSequence content_text, Class<?> activity_class, ...
Inversion-Mutation
megadiff
"@Override protected void doGenerate(IProgressMonitor monitor) throws Exception { // TODO: IoC IGraphwizService graphwizService = TacoCorePlugin.getDefault().getGraphwizService(); if (!GraphwizDiagnostics.diagnoze(getShell(), graphwizService)) { graphwizService = null; } LatexGenerator generator...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doGenerate"
"@Override protected void doGenerate(IProgressMonitor monitor) throws Exception { IGraphwizService graphwizService = TacoCorePlugin.getDefault().getGraphwizService(); if (!GraphwizDiagnostics.diagnoze(getShell(), graphwizService)) { graphwizService = null; } <MASK>// TODO: IoC</MASK> LatexGenera...
Inversion-Mutation
megadiff
"public static void saveToFileAsJSON(ArrayList<Shuttle> shuttleList) { try { JsonFactory f = new JsonFactory(); JsonGenerator gen = f.createJsonGenerator(new FileWriter(new File("shuttleOutputData.txt"))); HashMap<String, Integer> map = null; //gen.writeArrayFieldStart("ShuttleETA"); gen.wri...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "saveToFileAsJSON"
"public static void saveToFileAsJSON(ArrayList<Shuttle> shuttleList) { try { JsonFactory f = new JsonFactory(); JsonGenerator gen = f.createJsonGenerator(new FileWriter(new File("shuttleOutputData.txt"))); HashMap<String, Integer> map = null; //gen.writeArrayFieldStart("ShuttleETA"); gen.wri...
Inversion-Mutation
megadiff
"public String parse() throws IOException { BufferedReader in = new BufferedReader(new FileReader(file)); StringBuilder pluginTimes = new StringBuilder(); StringBuilder pluginNames = new StringBuilder(); String currentPlugin = null; long totalTime = 0; pluginTimes...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "parse"
"public String parse() throws IOException { BufferedReader in = new BufferedReader(new FileReader(file)); StringBuilder pluginTimes = new StringBuilder(); StringBuilder pluginNames = new StringBuilder(); String currentPlugin = null; long totalTime = 0; pluginTimes...
Inversion-Mutation
megadiff
"public TupleCache( DirectoryServiceConfiguration factoryCfg ) throws NamingException { normalizerMap = factoryCfg.getRegistries().getAttributeTypeRegistry().getNormalizerMapping(); this.nexus = factoryCfg.getPartitionNexus(); attributeTypeRegistry = factoryCfg.getRegistries().getAttributeT...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "TupleCache"
"public TupleCache( DirectoryServiceConfiguration factoryCfg ) throws NamingException { normalizerMap = factoryCfg.getRegistries().getAttributeTypeRegistry().getNormalizerMapping(); this.nexus = factoryCfg.getPartitionNexus(); attributeTypeRegistry = factoryCfg.getRegistries().getAttributeT...
Inversion-Mutation
megadiff
"@Override public void onEnable() { initVariables(); createConfig(); getDBV(); if(config.getBoolean("autoupdate", true)) checkForUpdates(); usesSP = config.getBoolean("superperm", true); hasData = config.getIntegerList("hasData"); loadItems(); getCommand("preview").setExecutor(preview); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onEnable"
"@Override public void onEnable() { initVariables(); <MASK>getDBV();</MASK> createConfig(); if(config.getBoolean("autoupdate", true)) checkForUpdates(); usesSP = config.getBoolean("superperm", true); hasData = config.getIntegerList("hasData"); loadItems(); getCommand("preview").setExecuto...
Inversion-Mutation
megadiff
"private void bindMailboxItem(View view, Context context, Cursor cursor, boolean isLastChild) { // Reset the view (in case it was recycled) and prepare for binding AccountFolderListItem itemView = (AccountFolderListItem) view; itemView.bindViewInit(this, false); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "bindMailboxItem"
"private void bindMailboxItem(View view, Context context, Cursor cursor, boolean isLastChild) { // Reset the view (in case it was recycled) and prepare for binding AccountFolderListItem itemView = (AccountFolderListItem) view; itemView.bindViewInit(this, false); ...
Inversion-Mutation
megadiff
"@Override public void execute(String commandString, ConnectionContext context) throws IOException { Session session = context.getSession(); if (!session.getHasSender()) { context.sendResponse("503 Error: need MAIL command"); return; } else if (session.getRecipientCount() == 0) { con...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "execute"
"@Override public void execute(String commandString, ConnectionContext context) throws IOException { Session session = context.getSession(); if (!session.getHasSender()) { context.sendResponse("503 Error: need MAIL command"); return; } else if (session.getRecipientCount() == 0) { con...
Inversion-Mutation
megadiff
"public Map<QName, Object> getAnyAttribute(Object target) { try { Map<QName, Object> map = (Map<QName, Object>) anyAttributeField.get(target); if (map == null) { map = Maps.newHashMap(); anyAttributeField.set(target, map); } return map; } catch (IllegalAccessException e) { throw new...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getAnyAttribute"
"public Map<QName, Object> getAnyAttribute(Object target) { try { Map<QName, Object> map = (Map<QName, Object>) anyAttributeField.get(target); if (map == null) { <MASK>anyAttributeField.set(target, map);</MASK> map = Maps.newHashMap(); } return map; } catch (IllegalAccessException e) { ...
Inversion-Mutation
megadiff
"public static List<Element> handlePropertyName(String[] propertyNames, ServiceContext context, boolean freq, int maxRecords, String cswServiceSpecificConstraint, LuceneConfig luceneConfig) throws Exception { List<Element> domainValuesList = null; if(Log.isDebugEnabled(Geonet.CSW)) Log....
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "handlePropertyName"
"public static List<Element> handlePropertyName(String[] propertyNames, ServiceContext context, boolean freq, int maxRecords, String cswServiceSpecificConstraint, LuceneConfig luceneConfig) throws Exception { List<Element> domainValuesList = null; if(Log.isDebugEnabled(Geonet.CSW)) Log....
Inversion-Mutation
megadiff
"@Override public Image getImage() { synchronized (this) { if (image == null) { image = AbstractUIPlugin.imageDescriptorFromPlugin(Plugin.PLUGIN_ID, "/icons/brick.png").createImage(); } return image; } }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getImage"
"@Override public Image getImage() { synchronized (this) { if (image == null) { image = AbstractUIPlugin.imageDescriptorFromPlugin(Plugin.PLUGIN_ID, "/icons/brick.png").createImage(); } } <MASK>return image;</MASK> }"
Inversion-Mutation
megadiff
"public int removeItemsFromPlayer(Player p, ItemStack i, int amount) { int taken = 0; if(configManager.brautec == 1) { int firstempty = p.getInventory().firstEmpty(); if(firstempty == -1) { Main.lng.msg(p,"err_full_inv"); return 0; } else { for (int u = 0; u < 36; u...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "removeItemsFromPlayer"
"public int removeItemsFromPlayer(Player p, ItemStack i, int amount) { int taken = 0; if(configManager.brautec == 1) { int firstempty = p.getInventory().firstEmpty(); if(firstempty == -1) { Main.lng.msg(p,"err_full_inv"); return 0; } else { for (int u = 0; u < 36; u...
Inversion-Mutation
megadiff
"@Deprecated public static void destroyAll(Application app) { if (isManaged(app)) { ManagementContext managementContext = app.getManagementContext(); if (app instanceof Startable) Entities.invokeEffector((EntityLocal)app, app, Startable.STOP).getUnchecked(); if (app ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "destroyAll"
"@Deprecated public static void destroyAll(Application app) { if (isManaged(app)) { ManagementContext managementContext = app.getManagementContext(); if (app instanceof Startable) Entities.invokeEffector((EntityLocal)app, app, Startable.STOP).getUnchecked(); if (app ...
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.PROJE...
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.PROJE...
Inversion-Mutation
megadiff
"private JPanel createSummaryInfoPanel() { JPanel summaryPanel = new JPanel(); summaryPanel.setLayout(new BorderLayout(10, 5)); summaryPanel.setSize(this.getWidth(), this.getHeight()); // Create the avatar panel. JPanel avatarPanel = new JPanel(); avatarP...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createSummaryInfoPanel"
"private JPanel createSummaryInfoPanel() { JPanel summaryPanel = new JPanel(); summaryPanel.setLayout(new BorderLayout(10, 5)); summaryPanel.setSize(this.getWidth(), this.getHeight()); // Create the avatar panel. JPanel avatarPanel = new JPanel(); avatarP...
Inversion-Mutation
megadiff
"protected void onCreate(Bundle savedInstanceState) { try { super.onCreate(savedInstanceState); nversion = getPackageManager().getPackageInfo(getPackageName(), 0).versionName; /*mNotificationManagerUpdate = (NotificationManager)getBaseContext().getSystemService(Context.NO...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onCreate"
"protected void onCreate(Bundle savedInstanceState) { try { super.onCreate(savedInstanceState); /*mNotificationManagerUpdate = (NotificationManager)getBaseContext().getSystemService(Context.NOTIFICATION_SERVICE); mNotificationManagerUpdate.cancel(SIMPLE_NOTFICATION_UPDAT...
Inversion-Mutation
megadiff
"public void hidePlaceholder() { if (super.getTextBox().getText().equals(this.getPlaceholderText())) { super.getTextBox().setText(""); } super.getTextBox().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.getTextBox().getText().equals(this.getPlaceholderText())) { super.getTextBox().setText(""); <MASK>super.getTextBox().removeStyleName(this.getPlaceholderStyleName());</MASK> } }"
Inversion-Mutation
megadiff
"public ArrayList<String> resolveMemory(Variable m1, Variable m2) { RegisterHandler registerHanlder = RegisterHandler.getInstance(); ArrayList<String> result = new ArrayList<String>(); String reg1 = registerHanlder.getRegister(); CodeGenerator.assembler.add("MOV "+reg1+" , "+m2.getName()); result.add(m...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "resolveMemory"
"public ArrayList<String> resolveMemory(Variable m1, Variable m2) { RegisterHandler registerHanlder = RegisterHandler.getInstance(); ArrayList<String> result = new ArrayList<String>(); String reg1 = registerHanlder.getRegister(); CodeGenerator.assembler.add("MOV "+reg1+" , "+m2.getName()); <MASK>result....
Inversion-Mutation
megadiff
"public AbstractTempRegion(RegionBroker broker, DestinationStatistics destinationStatistics, SystemUsage memoryManager, TaskRunnerFactory taskRunnerFactory, DestinationFactory destinationFactory) { super(broker, destinationStatistics, memoryManager, taskRunnerFactory, ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "AbstractTempRegion"
"public AbstractTempRegion(RegionBroker broker, DestinationStatistics destinationStatistics, SystemUsage memoryManager, TaskRunnerFactory taskRunnerFactory, DestinationFactory destinationFactory) { super(broker, destinationStatistics, memoryManager, taskRunnerFactory, ...
Inversion-Mutation
megadiff
"public static void init(File mainDir){ log("Starting up..."); try{ ApiBase.mainDir = mainDir; apiDir = new File(mainDir, "/BL/"); if(!apiDir.exists() && !apiDir.mkdir()){ log("[ERROR] Could not create main API directory!"); } ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "init"
"public static void init(File mainDir){ log("Starting up..."); try{ ApiBase.mainDir = mainDir; apiDir = new File(mainDir, "/BL/"); if(!apiDir.exists() && !apiDir.mkdir()){ log("[ERROR] Could not create main API directory!"); } ...
Inversion-Mutation
megadiff
"@Override public List<BeanMetaData> getBeans() { ArrayList<BeanMetaData> result = new ArrayList<BeanMetaData>(); //Create AspectBinding AbstractBeanMetaData stack = new AbstractBeanMetaData(); stack.setName(name); BeanMetaDataUtil.setSimpleProperty(stack, "name", name); ...
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 stack = new AbstractBeanMetaData(); stack.setName(name); BeanMetaDataUtil.setSimpleProperty(stack, "name", name); ...
Inversion-Mutation
megadiff
"@Override public void bindView(View view, Context context, Cursor cursor) { Account account = getAccountFromCursor(cursor); String fromList = cursor.getString(SENDER_LIST_COLUMN); String toList = cursor.getString(TO_LIST_COLUMN); String ccList = cursor.get...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "bindView"
"@Override public void bindView(View view, Context context, Cursor cursor) { Account account = getAccountFromCursor(cursor); String fromList = cursor.getString(SENDER_LIST_COLUMN); String toList = cursor.getString(TO_LIST_COLUMN); String ccList = cursor.get...
Inversion-Mutation
megadiff
"public GuiSetupGui(GpsMidDisplayable parent, boolean initialSetup) { super(Locale.get("guisetupgui.GUIOptions")/*GUI Options*/); this.parent = parent; this.initialSetup = initialSetup; try { String [] imenu = new String[5]; imenu[0] = Locale.get("guisetupgui.UseIconMenu")/*Use icon menu*/; imen...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "GuiSetupGui"
"public GuiSetupGui(GpsMidDisplayable parent, boolean initialSetup) { super(Locale.get("guisetupgui.GUIOptions")/*GUI Options*/); this.parent = parent; this.initialSetup = initialSetup; try { String [] imenu = new String[5]; imenu[0] = Locale.get("guisetupgui.UseIconMenu")/*Use icon menu*/; imen...
Inversion-Mutation
megadiff
"@Override public void start(BundleContext bundleContext) throws Exception { super.start(bundleContext); plugin = this; DebugUtil.configurePluginDebugOptions(); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "start"
"@Override public void start(BundleContext bundleContext) throws Exception { super.start(bundleContext); <MASK>DebugUtil.configurePluginDebugOptions();</MASK> plugin = this; }"
Inversion-Mutation
megadiff
"private void sendPacket(FCpacket packet) { DatagramPacket outgoing; outgoing = new DatagramPacket(packet.getSeqNumBytesAndData(), packet.getSeqNumBytesAndData().length, server, FileCopyServer.SERVER_PORT); testOut("Sending packet: " + packet.getSeqNum()); packet.setTimestamp(System.nanoTime()); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "sendPacket"
"private void sendPacket(FCpacket packet) { DatagramPacket outgoing; outgoing = new DatagramPacket(packet.getSeqNumBytesAndData(), packet.getSeqNumBytesAndData().length, server, FileCopyServer.SERVER_PORT); testOut("Sending packet: " + packet.getSeqNum()); try { socket.send(outgoing); } ca...
Inversion-Mutation
megadiff
"@Override protected void onResume() { super.onResume(); mWifiEnabler.resume(); mBtEnabler.resume(); mAirplaneModeEnabler.resume(); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onResume"
"@Override protected void onResume() { super.onResume(); mWifiEnabler.resume(); <MASK>mAirplaneModeEnabler.resume();</MASK> mBtEnabler.resume(); }"
Inversion-Mutation
megadiff
"public void checkGhosts() { for (Ghost ghost : this.mGhosts) { if (this.mTheMan.isCollidingWith(ghost)) { switch (ghost.getState()) { case CHASE: case SCATTER: if (this.mIsGhostDeadly && (this.mTheMan.getState() == TheMan.State.ALIVE)) { //Kill "The Man" ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "checkGhosts"
"public void checkGhosts() { for (Ghost ghost : this.mGhosts) { if (this.mTheMan.isCollidingWith(ghost)) { switch (ghost.getState()) { case CHASE: case SCATTER: if (this.mIsGhostDeadly && (this.mTheMan.getState() == TheMan.State.ALIVE)) { //Kill "The Man" ...
Inversion-Mutation
megadiff
"private void parseInitialEngineOutput() { if (lue.nextLine().equals("A")) { team = true; } else { team = false; } int rowNum = 0; while (lue.hasNextLine()) { String line = lue.nextLine(); if (line.length() < 2) { ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "parseInitialEngineOutput"
"private void parseInitialEngineOutput() { if (lue.nextLine().equals("A")) { team = true; } else { team = false; } int rowNum = 0; while (lue.hasNextLine()) { String line = lue.nextLine(); if (line.length() < 2) { ...
Inversion-Mutation
megadiff
"@Override public int getCount() { if (itemsAddedWithoutNotify > 0) { itemsAddedWithoutNotify = 0; notifyDataSetChanged(); // This is incase getCount is called between our data set updates, which triggers IllegalStateException, listView does a simple if (mItemCount != mAdapter.getCount()) { } return...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getCount"
"@Override public int getCount() { if (itemsAddedWithoutNotify > 0) { <MASK>notifyDataSetChanged(); // This is incase getCount is called between our data set updates, which triggers IllegalStateException, listView does a simple if (mItemCount != mAdapter.getCount()) {</MASK> itemsAddedWithoutNotify = 0; ...
Inversion-Mutation
megadiff
"protected void verifyTrustInCerts( X509Certificate[] certificates, Crypto crypto, RequestData data, boolean enableRevocation ) throws WSSecurityException { // // Use the validation method from the crypto to check whether the subjects' // certificat...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "verifyTrustInCerts"
"protected void verifyTrustInCerts( X509Certificate[] certificates, Crypto crypto, RequestData data, boolean enableRevocation ) throws WSSecurityException { <MASK>String subjectString = certificates[0].getSubjectX500Principal().getName();</MASK> // //...
Inversion-Mutation
megadiff
"private List<Mutant> generateMutants(JavaClass clazz, Method bcelMethod, EMutationOperator operator) throws ClassNotFoundException { List<Mutant> mutants = new ArrayList<Mutant>(); Set<EMutationInstruction> instructions = operator.getInstructions(); if (instructions == null || instructions.size() ==...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "generateMutants"
"private List<Mutant> generateMutants(JavaClass clazz, Method bcelMethod, EMutationOperator operator) throws ClassNotFoundException { List<Mutant> mutants = new ArrayList<Mutant>(); Set<EMutationInstruction> instructions = operator.getInstructions(); if (instructions == null || instructions.size() ==...
Inversion-Mutation
megadiff
"public void add(String cmd) { if (cmd != null && !cmd.equals("") && (cmds.size() == 0 || !cmds.get(cmds.size() - 1).equals(cmd))) { cmds.add(cmd); } pos = cmds.size(); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "add"
"public void add(String cmd) { if (cmd != null && !cmd.equals("") && (cmds.size() == 0 || !cmds.get(cmds.size() - 1).equals(cmd))) { cmds.add(cmd); <MASK>pos = cmds.size();</MASK> } }"
Inversion-Mutation
megadiff
"public void removeItem(Item item) { int amount = item.getAmount(); int itemId = item.getItemId(); for (int i = 0; getArray().length > i; i++) { if (getArray()[i] == null) continue; if (getArray()[i].c == itemId) { int tempAmount = g...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "removeItem"
"public void removeItem(Item item) { int amount = item.getAmount(); int itemId = item.getItemId(); for (int i = 0; getArray().length > i; i++) { if (getArray()[i] == null) continue; if (getArray()[i].c == itemId) { int tempAmount = g...
Inversion-Mutation
megadiff
"@Override protected Boolean doInBackgroundInternal(Geocache[] caches) { final StringBuilder fieldNoteBuffer = new StringBuilder(); try { int i = 0; for (final Geocache cache : caches) { if (cache.isLogOffline()) { ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doInBackgroundInternal"
"@Override protected Boolean doInBackgroundInternal(Geocache[] caches) { final StringBuilder fieldNoteBuffer = new StringBuilder(); try { int i = 0; for (final Geocache cache : caches) { if (cache.isLogOffline()) { ...
Inversion-Mutation
megadiff
"@Override protected void processUnsolicited (Parcel p) { Object ret; int dataPosition = p.dataPosition(); // save off position within the Parcel int response = p.readInt(); switch(response) { case RIL_UNSOL_RIL_CONNECTED: // Fix for NV/RUIM setting on CDMA S...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "processUnsolicited"
"@Override protected void processUnsolicited (Parcel p) { Object ret; int dataPosition = p.dataPosition(); // save off position within the Parcel int response = p.readInt(); switch(response) { case RIL_UNSOL_RIL_CONNECTED: // Fix for NV/RUIM setting on CDMA S...
Inversion-Mutation
megadiff
"protected void installAuthHeader(SOAPMessageContext context) { Map<String, List<String>> httpResponseHeaders = getHttpResponseHeaders(context); if (httpResponseHeaders == null) { httpResponseHeaders = new HashMap<String, List<String>>(); } List<String> basicAuthToken = new LinkedList<Strin...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "installAuthHeader"
"protected void installAuthHeader(SOAPMessageContext context) { Map<String, List<String>> httpResponseHeaders = getHttpResponseHeaders(context); if (httpResponseHeaders == null) { httpResponseHeaders = new HashMap<String, List<String>>(); } List<String> basicAuthToken = new LinkedList<Strin...
Inversion-Mutation
megadiff
"public static void spout(Player player) { WaterSpout spout = instances.get(player); player.setSprinting(false); // if (player.getVelocity().length() > threshold) { // // Tools.verbose("Too fast!"); // player.setVelocity(player.getVelocity().clone().normalize() // .multiply(threshold * .5)); // } ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "spout"
"public static void spout(Player player) { WaterSpout spout = instances.get(player); player.setSprinting(false); // if (player.getVelocity().length() > threshold) { // // Tools.verbose("Too fast!"); // player.setVelocity(player.getVelocity().clone().normalize() // .multiply(threshold * .5)); // } ...
Inversion-Mutation
megadiff
"protected final Watchers getWatches(NotifyType type) throws OrmException { Watchers matching = new Watchers(); Set<Account.Id> projectWatchers = new HashSet<Account.Id>(); for (AccountProjectWatch w : args.db.get().accountProjectWatches() .byProject(change.getProject())) { if (w.isNot...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getWatches"
"protected final Watchers getWatches(NotifyType type) throws OrmException { Watchers matching = new Watchers(); Set<Account.Id> projectWatchers = new HashSet<Account.Id>(); for (AccountProjectWatch w : args.db.get().accountProjectWatches() .byProject(change.getProject())) { <MASK>projec...
Inversion-Mutation
megadiff
"@Override protected void onDestroy() { super.onDestroy(); if(!m_isRetainingNonConfig) { try { m_model.close(); } catch (IOException e) { } } }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onDestroy"
"@Override protected void onDestroy() { if(!m_isRetainingNonConfig) { try { m_model.close(); } catch (IOException e) { } } <MASK>super.onDestroy();</MASK> }"
Inversion-Mutation
megadiff
"public void sceMpegRingbufferAvailableSize(Processor processor) { CpuState cpu = processor.cpu; // New-Style Processor // Processor cpu = processor; // Old-Style Processor Memory mem = Processor.memory; int ringbuffer_addr = cpu.gpr[4]; if (enableMpeg) { Sc...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "sceMpegRingbufferAvailableSize"
"public void sceMpegRingbufferAvailableSize(Processor processor) { CpuState cpu = processor.cpu; // New-Style Processor // Processor cpu = processor; // Old-Style Processor Memory mem = Processor.memory; int ringbuffer_addr = cpu.gpr[4]; if (enableMpeg) { Sc...
Inversion-Mutation
megadiff
"private static void createFormComponent(final SchemaField field, final HtmlViewContentForm iForm, final Object fieldValue) { final AreaComponent areaForRendering = iForm.searchAreaForRendering(field.getFeature(ViewFieldFeatures.POSITION), field); if (areaForRendering == null) { return; } SchemaObject n...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createFormComponent"
"private static void createFormComponent(final SchemaField field, final HtmlViewContentForm iForm, final Object fieldValue) { final AreaComponent areaForRendering = iForm.searchAreaForRendering(field.getFeature(ViewFieldFeatures.POSITION), field); if (areaForRendering == null) { return; } SchemaObject n...
Inversion-Mutation
megadiff
"public Object put(Object key, Object value) { Object oldValue = null; if (test != null) { oldValue = delegate.put(key, value); Object result = null; if (test.getMaximumNumberOfParameters() == 2) { result = test.call(new Object[] {key, value}); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "put"
"public Object put(Object key, Object value) { Object oldValue = null; if (test != null) { Object result = null; if (test.getMaximumNumberOfParameters() == 2) { result = test.call(new Object[] {key, value}); } else { result = te...
Inversion-Mutation
megadiff
"private void close(){ AppMgr.saveSettings(); ProjectMgr.closeProject(); dispose(); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "close"
"private void close(){ <MASK>ProjectMgr.closeProject();</MASK> AppMgr.saveSettings(); dispose(); }"
Inversion-Mutation
megadiff
"public void handleTableContentPosition(TableContentPosition tcpos) { log.debug("===handleTableContentPosition(" + tcpos); if (lastRow != tcpos.row && lastRow != null) { addAreasAndFlushRow(false); yoffset += lastRowHeight; this.accumulatedBP...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "handleTableContentPosition"
"public void handleTableContentPosition(TableContentPosition tcpos) { log.debug("===handleTableContentPosition(" + tcpos); <MASK>rowFO = null;</MASK> if (lastRow != tcpos.row && lastRow != null) { addAreasAndFlushRow(false); yoffset += lastRowHeig...
Inversion-Mutation
megadiff
"public void build() throws Exception { names = new Hashtable(); int access = superclass.getModifiers(); if ((access & Modifier.FINAL) != 0) { throw new InstantiationException("can't subclass final class"); } access = Modifier.PUBLIC | Modifier.SYNCHRONIZED; ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "build"
"public void build() throws Exception { names = new Hashtable(); int access = superclass.getModifiers(); if ((access & Modifier.FINAL) != 0) { throw new InstantiationException("can't subclass final class"); } access = Modifier.PUBLIC | Modifier.SYNCHRONIZED; ...
Inversion-Mutation
megadiff
"public void testActionLinkReferences() throws Throwable { myFixture.copyFileToProject("/WEB-INF/web.xml"); createStrutsFileSet("struts-actionLink.xml"); checkActionReference("/jsp/actionLink-reference_1.jsp", "actionLink1"); checkActionReference("/jsp/actionLink-reference_2.jsp", "rootActionLink")...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "testActionLinkReferences"
"public void testActionLinkReferences() throws Throwable { <MASK>createStrutsFileSet("struts-actionLink.xml");</MASK> myFixture.copyFileToProject("/WEB-INF/web.xml"); checkActionReference("/jsp/actionLink-reference_1.jsp", "actionLink1"); checkActionReference("/jsp/actionLink-reference_2.jsp", "roo...
Inversion-Mutation
megadiff
"public void moveNode(OwnerStreamNode n, SuccessCallback cb) { mOwner = n; moveNodeByIndex(mOwner.getIndex(), cb); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "moveNode"
"public void moveNode(OwnerStreamNode n, SuccessCallback cb) { <MASK>moveNodeByIndex(mOwner.getIndex(), cb);</MASK> mOwner = n; }"
Inversion-Mutation
megadiff
"private void createNetworkGame() throws GameException, IOException { game = new NetworkGame(); Player p = null; if(uiNewGamePanel.network_type == UIResourcesLoader.SERVER_GAME) { gServer = new GameServer(); gClient = new GameClient(Token.PLAYER_1); p = new HumanPlayer("Player1", Token.P...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createNetworkGame"
"private void createNetworkGame() throws GameException, IOException { game = new NetworkGame(); Player p = null; if(uiNewGamePanel.network_type == UIResourcesLoader.SERVER_GAME) { gServer = new GameServer(); gClient = new GameClient(Token.PLAYER_1); p = new HumanPlayer("Player1", Token.P...
Inversion-Mutation
megadiff
"@Override public void run() { while(true) { if(!((NetworkGame)game).isThisPlayerTurn()) { try { Thread.sleep(100); } catch (InterruptedException e1) { e1.printStackTrace(); } if(gClient.isThisPlayerTurn()) { // update game with opponent moves try { ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run"
"@Override public void run() { while(true) { if(!((NetworkGame)game).isThisPlayerTurn()) { try { Thread.sleep(100); } catch (InterruptedException e1) { e1.printStackTrace(); } if(gClient.isThisPlayerTurn()) { // update game with opponent moves try { ...
Inversion-Mutation
megadiff
"public TalkingLine() { condPar = new ArrayList<ConditionParser>(); consPar = new ArrayList<ConsequenceParser>(); condPar.add(new illarion.easynpc.parser.talk.conditions.State()); condPar.add(new illarion.easynpc.parser.talk.conditions.Skill()); condPar.add(new illarion.ea...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "TalkingLine"
"public TalkingLine() { condPar = new ArrayList<ConditionParser>(); consPar = new ArrayList<ConsequenceParser>(); condPar.add(new illarion.easynpc.parser.talk.conditions.State()); condPar.add(new illarion.easynpc.parser.talk.conditions.Skill()); condPar.add(new illarion.ea...
Inversion-Mutation
megadiff
"private Collection<FilePath> dirtyPaths(boolean includeChanges) { // TODO collapse paths with common prefix ArrayList<FilePath> paths = new ArrayList<FilePath>(); FilePath rootPath = VcsUtil.getFilePath(myVcsRoot.getPath(), true); for (FilePath p : myDirtyScope.getRecursivelyDirtyDirectories()) { ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "dirtyPaths"
"private Collection<FilePath> dirtyPaths(boolean includeChanges) { // TODO collapse paths with common prefix ArrayList<FilePath> paths = new ArrayList<FilePath>(); FilePath rootPath = VcsUtil.getFilePath(myVcsRoot.getPath(), true); for (FilePath p : myDirtyScope.getRecursivelyDirtyDirectories()) { ...
Inversion-Mutation
megadiff
"public ObjectTreePanel(ISession session) { super(); if (session == null) { throw new IllegalArgumentException("ISession == null"); } _session = session; _emptyTabPane = new ObjectTreeTabbedPane(_session); CreateGUI(); // Register tabs to display in the details panel for database nod...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "ObjectTreePanel"
"public ObjectTreePanel(ISession session) { super(); if (session == null) { throw new IllegalArgumentException("ISession == null"); } _session = session; _emptyTabPane = new ObjectTreeTabbedPane(_session); CreateGUI(); // Register tabs to display in the details panel for database nod...
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 AbsPropagator Propagator( int kind, Rsrcc_src_dstc_dst simple, Rsrcc_src_fld_dstc_dst load, Rsrcc_src_dstc_dst_fld store, Robjc_obj_varc_var alloc, Qvarc_var_objc_obj propout, AbsPAG pag ) { switch( ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "Propagator"
"public AbsPropagator Propagator( int kind, Rsrcc_src_dstc_dst simple, Rsrcc_src_fld_dstc_dst load, Rsrcc_src_dstc_dst_fld store, Robjc_obj_varc_var alloc, Qvarc_var_objc_obj propout, AbsPAG pag ) { switch( ...
Inversion-Mutation
megadiff
"protected String searchFor(final String target, String start) { ArrayList matches = (ArrayList) allBundles.get(target); if (matches == null) return null; int numberOfMatches = matches.size(); if (numberOfMatches == 1) { return ((BundleInfo) matches.get(0)).location; } if (numberOfMatches == 0...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "searchFor"
"protected String searchFor(final String target, String start) { ArrayList matches = (ArrayList) allBundles.get(target); if (matches == null) return null; int numberOfMatches = matches.size(); if (numberOfMatches == 1) { return ((BundleInfo) matches.get(0)).location; } if (numberOfMatches == 0...
Inversion-Mutation
megadiff
"public void setPhysicsSpace(PhysicsSpace space) { if (space == null) { removeFromPhysicsSpace(); this.space = space; } else { if (this.space == space) { return; } this.space = space; addToPhysicsSpace(); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setPhysicsSpace"
"public void setPhysicsSpace(PhysicsSpace space) { if (space == null) { removeFromPhysicsSpace(); this.space = space; } else { if (this.space == space) { return; } this.space = space; addToPhysicsSpace(); ...
Inversion-Mutation
megadiff
"public void addSeamRuntime(String name, String version, String seamHome) { log.info("Adding Seam Runtime: " + name + "\nVersion: " + version + "\nHome: " + seamHome); SWTBot wiz = open.preferenceOpen(ActionItem.Preference.JBossToolsWebSeam.LABEL); SWTBotTable tbRuntimeEnvironments = bot.table(); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "addSeamRuntime"
"public void addSeamRuntime(String name, String version, String seamHome) { log.info("Adding Seam Runtime: " + name + "\nVersion: " + version + "\nHome: " + seamHome); SWTBot wiz = open.preferenceOpen(ActionItem.Preference.JBossToolsWebSeam.LABEL); SWTBotTable tbRuntimeEnvironments = bot.table(); ...
Inversion-Mutation
megadiff
"public void draw() { if(!visible) { return; } antFarm.translate(position.x, position.y); antFarm.rotate(rotation); antFarm.strokeWeight(1f); if(antFarm.isDrawViewDirectionEnabled()) { antFarm.stroke(Color.RED.getRGB()); antFarm....
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "draw"
"public void draw() { if(!visible) { return; } antFarm.translate(position.x, position.y); antFarm.rotate(rotation); if(antFarm.isDrawViewDirectionEnabled()) { antFarm.stroke(Color.RED.getRGB()); antFarm.line(0, 0, 0, -4f * SIZE); }...
Inversion-Mutation
megadiff
"@Override public void encodeEnd(final FacesContext context, final UIComponent component) throws IOException { ResponseWriter writer = context.getResponseWriter(); Tooltip tooltip = (Tooltip) component; String clientId = tooltip.getClientId(context); boolean global = tooltip.isGlobal(); boolean shared ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "encodeEnd"
"@Override public void encodeEnd(final FacesContext context, final UIComponent component) throws IOException { ResponseWriter writer = context.getResponseWriter(); Tooltip tooltip = (Tooltip) component; String clientId = tooltip.getClientId(context); boolean global = tooltip.isGlobal(); boolean shared ...
Inversion-Mutation
megadiff
"protected void createAndShowGUI(MainPanelStandalone mainPanel) { initLog(); GuiInit.init(); //Create and set up the window. frame = new JFrame(Globals.APPLICATION_NAME); // dispose on close, otherwise windowClosed event is not called. frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createAndShowGUI"
"protected void createAndShowGUI(MainPanelStandalone mainPanel) { initLog(); GuiInit.init(); //Create and set up the window. frame = new JFrame(Globals.APPLICATION_NAME); // dispose on close, otherwise windowClosed event is not called. frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); ...
Inversion-Mutation
megadiff
"public static ArrayList<String> getJarFiles(Class<?> jarClass, String path) throws IOException { String jarPath = jarClass.getResource("/" + path).getPath(); jarPath = jarPath.substring(5, jarPath.indexOf("!")); ArrayList<String> fileNameList = new ArrayList<>(); JarFile jar = n...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getJarFiles"
"public static ArrayList<String> getJarFiles(Class<?> jarClass, String path) throws IOException { String jarPath = jarClass.getResource("/" + path).getPath(); jarPath = jarPath.substring(5, jarPath.indexOf("!")); ArrayList<String> fileNameList = new ArrayList<>(); JarFile jar = n...
Inversion-Mutation
megadiff
"public static void poll(int delta) { if (currentMusic != null) { SoundStore.get().poll(delta); if (!SoundStore.get().isMusicPlaying()) { currentMusic = null; currentMusic.fireMusicEnded(); } } }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "poll"
"public static void poll(int delta) { if (currentMusic != null) { SoundStore.get().poll(delta); if (!SoundStore.get().isMusicPlaying()) { <MASK>currentMusic.fireMusicEnded();</MASK> currentMusic = null; } } }"
Inversion-Mutation
megadiff
"public List<InputSplit> getSplits(JobContext context) throws IOException { log.setLevel(getLogLevel(context)); validateOptions(context); LinkedList<InputSplit> splits = new LinkedList<InputSplit>(); Map<String,BatchScanConfig> tableConfigs = getBatchScanConfigs(context); for (Map.Entry<Strin...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getSplits"
"public List<InputSplit> getSplits(JobContext context) throws IOException { log.setLevel(getLogLevel(context)); validateOptions(context); LinkedList<InputSplit> splits = new LinkedList<InputSplit>(); Map<String,BatchScanConfig> tableConfigs = getBatchScanConfigs(context); for (Map.Entry<Strin...
Inversion-Mutation
megadiff
"@Override protected void onCreate(Bundle icicle) { super.onCreate(icicle); getPreferenceManager().setSharedPreferencesName(Wallpaper.SHARED_PREFS_NAME); addPreferencesFromResource(R.xml.settings); mFile = findPreference("file"); mRendererMode = (ListPreference) findPreference("rendererMode"); mTim...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onCreate"
"@Override protected void onCreate(Bundle icicle) { super.onCreate(icicle); getPreferenceManager().setSharedPreferencesName(Wallpaper.SHARED_PREFS_NAME); addPreferencesFromResource(R.xml.settings); <MASK>getPreferenceManager().getSharedPreferences().registerOnSharedPreferenceChangeListener(this);</MASK> ...
Inversion-Mutation
megadiff
"public static IStatus handleError(final String title, final String message, Throwable e, final Shell shell) { IStatus status = createStatus(e); log(status); openErrorDialog(title, message, status, shell); return status; }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "handleError"
"public static IStatus handleError(final String title, final String message, Throwable e, final Shell shell) { IStatus status = createStatus(e); <MASK>openErrorDialog(title, message, status, shell);</MASK> log(status); return status; }"
Inversion-Mutation
megadiff
"private void appendContentTitle(StringBuilder builder, FocusPoint focusPoint) { FocusPoint childFocusPoint = focusPoint.getChild(); builder.append(focusPoint.getName()); if (childFocusPoint != null) { builder.append(TITLE_SEPARATOR); appendContentTitle(builder, childFocusPoint); } }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "appendContentTitle"
"private void appendContentTitle(StringBuilder builder, FocusPoint focusPoint) { FocusPoint childFocusPoint = focusPoint.getChild(); builder.append(focusPoint.getName()); <MASK>builder.append(TITLE_SEPARATOR);</MASK> if (childFocusPoint != null) { appendContentTitle(builder, childFocusPoint); } }"
Inversion-Mutation
megadiff
"@Override public void handleMessage(Message msg) { BluetoothAudioGateway.IncomingConnectionInfo info = (BluetoothAudioGateway.IncomingConnectionInfo)msg.obj; int type = BluetoothHandsfree.TYPE_UNKNOWN; switch(msg.what) { case BluetoothAu...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "handleMessage"
"@Override public void handleMessage(Message msg) { BluetoothAudioGateway.IncomingConnectionInfo info = (BluetoothAudioGateway.IncomingConnectionInfo)msg.obj; int type = BluetoothHandsfree.TYPE_UNKNOWN; switch(msg.what) { case BluetoothAu...
Inversion-Mutation
megadiff
"public DBObject getEntity(String coll, String qKey, String qValue, String filters, String sort, int limit, int skip, String successMsg, boolean count, String...fieldNames) { DBObject query; BasicDBObject fields; try { query = new BasicDBObject(); if(qKey != null && qValue != null && (...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getEntity"
"public DBObject getEntity(String coll, String qKey, String qValue, String filters, String sort, int limit, int skip, String successMsg, boolean count, String...fieldNames) { DBObject query; BasicDBObject fields; try { query = new BasicDBObject(); if(qKey != null && qValue != null && (...
Inversion-Mutation
megadiff
"public synchronized void receivePosition(Position pos) { // FIXME signal on location gained //#debug info logger.info("New position: " + pos); collected++; if (Configuration.getAutoRecenterToGpsMilliSecs() !=0 && getDurationSinceLastUserActionTime() > Configuration.getAutoRecenterToGpsMilliSecs() ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "receivePosition"
"public synchronized void receivePosition(Position pos) { // FIXME signal on location gained //#debug info logger.info("New position: " + pos); <MASK>this.pos = pos;</MASK> collected++; if (Configuration.getAutoRecenterToGpsMilliSecs() !=0 && getDurationSinceLastUserActionTime() > Configuration.ge...
Inversion-Mutation
megadiff
"public final void removeMyselfNoConfirm(final Host dcHost, final boolean testOnly) { final List<ServiceInfo> children = new ArrayList<ServiceInfo>(); if (!testOnly) { final Enumeration e = getNode().children(); while (e.hasMoreEle...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "removeMyselfNoConfirm"
"public final void removeMyselfNoConfirm(final Host dcHost, final boolean testOnly) { final List<ServiceInfo> children = new ArrayList<ServiceInfo>(); if (!testOnly) { final Enumeration e = getNode().children(); while (e.hasMoreEle...
Inversion-Mutation
megadiff
"private void notifyStatus(ConnectionStatus status, ConnectionError error, String errorMsg) { try { connectionStatus = status; if (this.statusDelegate != null) { //create structure final HStatus hstatus = new HStatus(); hstatus.setStatus(status); hstatus.setErrorCode(error); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "notifyStatus"
"private void notifyStatus(ConnectionStatus status, ConnectionError error, String errorMsg) { try { <MASK>if (this.statusDelegate != null) {</MASK> connectionStatus = status; //create structure final HStatus hstatus = new HStatus(); hstatus.setStatus(status); hstatus.setErrorCode...
Inversion-Mutation
megadiff
"@Override public void close() { if (store != null) { getFolder().close(); try { store.close(); } catch (MessagingException e) { throw new RuntimeException(e); } } }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "close"
"@Override public void close() { if (store != null) { try { store.close(); } catch (MessagingException e) { throw new RuntimeException(e); } <MASK>getFolder().close();</MASK> } }"
Inversion-Mutation
megadiff
"@Override protected void onResume() { super.onResume(); mWifiEnabler.resume(); mBtEnabler.resume(); mAirplaneModeEnabler.resume(); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onResume"
"@Override protected void onResume() { super.onResume(); mWifiEnabler.resume(); <MASK>mAirplaneModeEnabler.resume();</MASK> mBtEnabler.resume(); }"
Inversion-Mutation
megadiff
"protected synchronized void handleResponse(int color, String line, Scanner s) { if (color == oregoColor && line.contains("playout")) { out.println(";C[" + line.substring(line.indexOf(' ') + 1) + "]"); out.flush(); endPrograms(); return; } if (line.startsWith("=")) { if (mode == REQUESTING_...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "handleResponse"
"protected synchronized void handleResponse(int color, String line, Scanner s) { if (color == oregoColor && line.contains("playout")) { out.println(";C[" + line.substring(line.indexOf(' ') + 1) + "]"); out.flush(); endPrograms(); return; } if (line.startsWith("=")) { if (mode == REQUESTING_...
Inversion-Mutation
megadiff
"public void addSeamRuntime(String name, String version, String seamHome) { log.info("Adding Seam Runtime: " + name + "\nVersion: " + version + "\nHome: " + seamHome); SWTBot wiz = open.preferenceOpen(ActionItem.Preference.JBossToolsWebSeam.LABEL); SWTBotTable tbRuntimeEnvironments = bot.table(); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "addSeamRuntime"
"public void addSeamRuntime(String name, String version, String seamHome) { log.info("Adding Seam Runtime: " + name + "\nVersion: " + version + "\nHome: " + seamHome); SWTBot wiz = open.preferenceOpen(ActionItem.Preference.JBossToolsWebSeam.LABEL); SWTBotTable tbRuntimeEnvironments = bot.table(); ...
Inversion-Mutation
megadiff
"@Override public void load(CompoundTag myplayerNBT) { if (myplayerNBT.getValue().containsKey("AutoRespawn")) { setAutoRespawnEnabled(((ByteTag) myplayerNBT.getValue().get("AutoRespawn")).getBooleanValue()); } if (myplayerNBT.getValue().containsKey("AutoRespawn...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "load"
"@Override public void load(CompoundTag myplayerNBT) { if (myplayerNBT.getValue().containsKey("AutoRespawn")) { setAutoRespawnEnabled(((ByteTag) myplayerNBT.getValue().get("AutoRespawn")).getBooleanValue()); } if (myplayerNBT.getValue().containsKey("AutoRespawn...
Inversion-Mutation
megadiff
"public static UILink make(UIContainer parent, String ID, String text, String target) { UILink togo = new UILink(); togo.ID = ID; togo.target = new UIOutput(); if (target != null) { togo.target.setValue(target); } if (text != null) { togo.linktext = new UIOutput(); to...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "make"
"public static UILink make(UIContainer parent, String ID, String text, String target) { UILink togo = new UILink(); togo.ID = ID; togo.target = new UIOutput(); if (target != null) { togo.target.setValue(target); } <MASK>togo.linktext = new UIOutput();</MASK> if (text != null) {...
Inversion-Mutation
megadiff
"private void execute(Process process) throws IOException { InputStream processIS = null; ServletOutputStream servletOS = null; try { processErrorStreamAsync(process); processServletInput(process); processIS = process.getInputStream(); parseHeaders(processIS); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "execute"
"private void execute(Process process) throws IOException { InputStream processIS = null; ServletOutputStream servletOS = null; try { processErrorStreamAsync(process); processServletInput(process); processIS = process.getInputStream(); <MASK>servletOS = response.getO...