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 loadMapFile(File resourceFile) throws FileNotFoundException {
myScanner = new Scanner(resourceFile);
loadTitle();
try {
loadPlayers();
loadSize();
loadTileIndex();
}
catch (MapNotMatchException e) {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "loadMapFile" | "public void loadMapFile(File resourceFile) throws FileNotFoundException {
myScanner = new Scanner(resourceFile);
loadTitle();
try {
loadPlayers();
loadSize();
}
catch (MapNotMatchException e) {
// TODO Auto-generat... |
Inversion-Mutation | megadiff | "public void getOut() {
// clean request pad from adder
Pad upstreamPeer = sink.getPeer();
upstreamPeer.setBlocked(true);
this.setState(State.NULL);
System.out.println("Remove from parent bin "
+ ((Bin) this.getParent()).remove(this));
upstreamPeer.getParentElement().releaseRequestPad(upstre... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getOut" | "public void getOut() {
// clean request pad from adder
Pad upstreamPeer = sink.getPeer();
upstreamPeer.setBlocked(true);
System.out.println("Remove from parent bin "
+ ((Bin) this.getParent()).remove(this));
<MASK>this.setState(State.NULL);</MASK>
upstreamPeer.getParentElement().releaseRequ... |
Inversion-Mutation | megadiff | "public Element transferManageItems(Element resources, String courseId, File resoucesDir, int item_ref_num) throws Exception
{
String fromUploadsColl = Entity.SEPARATOR+"private"+ REFERENCE_ROOT+ Entity.SEPARATOR+courseId+Entity.SEPARATOR+"uploads"+Entity.SEPARATOR;
List fromContextList = meleteCHService.getMem... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "transferManageItems" | "public Element transferManageItems(Element resources, String courseId, File resoucesDir, int item_ref_num) throws Exception
{
String fromUploadsColl = Entity.SEPARATOR+"private"+ REFERENCE_ROOT+ Entity.SEPARATOR+courseId+Entity.SEPARATOR+"uploads"+Entity.SEPARATOR;
List fromContextList = meleteCHService.getMem... |
Inversion-Mutation | megadiff | "@Override
protected void createAndShowGUI() {
System.setProperty("apple.laf.useScreenMenuBar", "true");
super.createAndShowGUI();
trayIcon.removeActionListener(settingsListener);
try {
OSXAdapter.setAboutHandler(this, AwtGatewayTray.class.getDeclaredMethod("about"... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createAndShowGUI" | "@Override
protected void createAndShowGUI() {
System.setProperty("apple.laf.useScreenMenuBar", "true");
<MASK>trayIcon.removeActionListener(settingsListener);</MASK>
super.createAndShowGUI();
try {
OSXAdapter.setAboutHandler(this, AwtGatewayTray.class.getDeclaredM... |
Inversion-Mutation | megadiff | "public OntologyParser(ParserInvocation parserInvocation) throws OntologyParserException {
super();
log.info("executor ...");
this.parserInvocation = parserInvocation;
if (!parserInvocation.valid())
throw new OntologyParserException(this.parserInvocation.getParserLog());
this.sourceOwlManager = OW... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "OntologyParser" | "public OntologyParser(ParserInvocation parserInvocation) throws OntologyParserException {
super();
log.info("executor ...");
if (!parserInvocation.valid())
throw new OntologyParserException(this.parserInvocation.getParserLog());
<MASK>this.parserInvocation = parserInvocation;</MASK>
this.sourceOw... |
Inversion-Mutation | megadiff | "public void showWarningBar(String warning)
{
if (warningBar_ == null)
{
warningBar_ = new InfoBar(InfoBar.WARNING, new ClickHandler() {
@Override
public void onClick(ClickEvent event)
{
hideWarningBar();
}
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "showWarningBar" | "public void showWarningBar(String warning)
{
if (warningBar_ == null)
{
warningBar_ = new InfoBar(InfoBar.WARNING, new ClickHandler() {
@Override
public void onClick(ClickEvent event)
{
hideWarningBar();
}
... |
Inversion-Mutation | megadiff | "public net.ivoa.SkyNode.MetaTable[] tables() throws java.rmi.RemoteException
{
Connection conn = null;
DBInterface dbi = null;
String []catalogNamesArray = null;
String []tableNamesArray = null;
List<String> catalogTableNamesList = null;
List<String> catalogTableDescriptionsList = null;
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "tables" | "public net.ivoa.SkyNode.MetaTable[] tables() throws java.rmi.RemoteException
{
Connection conn = null;
DBInterface dbi = null;
String []catalogNamesArray = null;
String []tableNamesArray = null;
List<String> catalogTableNamesList = null;
List<String> catalogTableDescriptionsList = null;
... |
Inversion-Mutation | megadiff | "private void deleteDigitalObject(Connection connection, String pid)
throws SQLException {
logFinest("Entered DefaultDOReplicator.deleteDigitalObject");
Statement st=null;
Statement st2=null;
ResultSet results=null;
try {
st=connection.createStatement();... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "deleteDigitalObject" | "private void deleteDigitalObject(Connection connection, String pid)
throws SQLException {
logFinest("Entered DefaultDOReplicator.deleteDigitalObject");
Statement st=null;
Statement st2=null;
ResultSet results=null;
try {
st=connection.createStatement();... |
Inversion-Mutation | megadiff | "public void handle(ChannelHandlerContext ctx, MessageEvent e) throws Exception {
NettyResponseFuture<?> future = NettyResponseFuture.class.cast(ctx.getAttachment());
WebSocketUpgradeHandler h = WebSocketUpgradeHandler.class.cast(future.getAsyncHandler());
Request request = future... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "handle" | "public void handle(ChannelHandlerContext ctx, MessageEvent e) throws Exception {
NettyResponseFuture<?> future = NettyResponseFuture.class.cast(ctx.getAttachment());
WebSocketUpgradeHandler h = WebSocketUpgradeHandler.class.cast(future.getAsyncHandler());
Request request = future... |
Inversion-Mutation | megadiff | "private void createMultiFieldCombo(Composite composite, GridData gd) {
toolkit.createLabel(composite, "Multiple field constraint");
final Combo combo = new Combo(composite, SWT.READ_ONLY);
combo.setLayoutData(gd);
combo.add("...");
combo.add("All of (And)");
combo.add("Any of (Or)");
combo.setData... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createMultiFieldCombo" | "private void createMultiFieldCombo(Composite composite, GridData gd) {
toolkit.createLabel(composite, "Multiple field constraint");
final Combo combo = new Combo(composite, SWT.READ_ONLY);
combo.setLayoutData(gd);
combo.add("...");
combo.add("All of (And)");
combo.add("Any of (Or)");
combo.setData... |
Inversion-Mutation | megadiff | "public void handleEvent(Event event) {
if (combo.getSelectionIndex() == 0) {
return;
}
CompositeFieldConstraint comp = new CompositeFieldConstraint();
comp.compositeJunctionType = combo.getText();
constraint.addConstraint( comp );
modeller.... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "handleEvent" | "public void handleEvent(Event event) {
if (combo.getSelectionIndex() == 0) {
return;
}
CompositeFieldConstraint comp = new CompositeFieldConstraint();
comp.compositeJunctionType = combo.getText();
constraint.addConstraint( comp );
<MASK>mode... |
Inversion-Mutation | megadiff | "public BlueMaggot() {
GameState.getInstance().init();
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setPreferredSize(new Dimension(GameState.getInstance().getWidth(), GameState.getInstance().getHeight() + 28));
setFocusable(true);
setResizable(false);
layeredPane.setBounds(0, 0, GameState.getIn... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "BlueMaggot" | "public BlueMaggot() {
GameState.getInstance().init();
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setPreferredSize(new Dimension(GameState.getInstance().getWidth(), GameState.getInstance().getHeight() + 28));
setFocusable(true);
setResizable(false);
layeredPane.setBounds(0, 0, GameState.getIn... |
Inversion-Mutation | megadiff | "private void processTax(AuctionEvent auctionEvent) {
Auction auction = auctionEvent.getAuction();
OfflinePlayer owner = auction.getOwner();
String ecoWorld = auction.getWorldGroup().getWorlds().get(0).getName();
double taxAmount;
if(auctionEvent instanceof AuctionStartEv... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "processTax" | "private void processTax(AuctionEvent auctionEvent) {
Auction auction = auctionEvent.getAuction();
OfflinePlayer owner = auction.getOwner();
String ecoWorld = auction.getWorldGroup().getWorlds().get(0).getName();
<MASK>Locale locale = localeHandler.getLocale(owner.getPlayer());</MASK... |
Inversion-Mutation | megadiff | "@SuppressWarnings("deprecation")
protected void installActionInternal(KernelControllerContext context) throws Throwable
{
KernelController controller = (KernelController) context.getController();
Kernel kernel = controller.getKernel();
KernelConfigurator configurator = kernel.getConfigurat... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "installActionInternal" | "@SuppressWarnings("deprecation")
protected void installActionInternal(KernelControllerContext context) throws Throwable
{
KernelController controller = (KernelController) context.getController();
Kernel kernel = controller.getKernel();
KernelConfigurator configurator = kernel.getConfigurat... |
Inversion-Mutation | megadiff | "protected boolean installInterestFilter(StructuredViewer viewer) {
if (viewer == null) {
MylarStatusHandler.log("The viewer to install InterestFilter is null", this);
return false;
}
try {
viewer.getControl().setRedraw(false);
previousFilters.addAll(Arrays.asList(viewer.getFilters()));
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "installInterestFilter" | "protected boolean installInterestFilter(StructuredViewer viewer) {
if (viewer == null) {
MylarStatusHandler.log("The viewer to install InterestFilter is null", this);
return false;
}
try {
viewer.getControl().setRedraw(false);
<MASK>viewer.addFilter(interestFilter);</MASK>
previousFilt... |
Inversion-Mutation | megadiff | "@Override
public void deploy() {
DeploymentInfo deploymentInfo = originalDeployment.clone();
deploymentInfo.validate();
final DeploymentImpl deployment = new DeploymentImpl(deploymentInfo);
this.deployment = deployment;
final ServletContextImpl servletContext = n... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "deploy" | "@Override
public void deploy() {
DeploymentInfo deploymentInfo = originalDeployment.clone();
deploymentInfo.validate();
final DeploymentImpl deployment = new DeploymentImpl(deploymentInfo);
this.deployment = deployment;
final ServletContextImpl servletContext = n... |
Inversion-Mutation | megadiff | "private RemoteViews getExpandedView(RemoteViews remote, Status status, Bitmap art) {
setupCommonViews(remote, status, art);
remote.setViewVisibility(R.id.control_prev, View.VISIBLE);
remote.setOnClickPendingIntent(R.id.control_prev, server.status().command.playback.pendingPrevious());
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getExpandedView" | "private RemoteViews getExpandedView(RemoteViews remote, Status status, Bitmap art) {
setupCommonViews(remote, status, art);
remote.setOnClickPendingIntent(R.id.control_prev, server.status().command.playback.pendingPrevious());
if(status == null || status.isStopped() || server.getAuthority()... |
Inversion-Mutation | megadiff | "public int doStartTag() throws JspException {
httpRequest = (HttpServletRequest) pageContext.getRequest();
requestContainer = ChannelUtilities.getRequestContainer(httpRequest);
responseContainer = ChannelUtilities.getResponseContainer(httpRequest);
urlBuilder = UrlBuilderFactory.getUrlBuilder();
msgBu... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doStartTag" | "public int doStartTag() throws JspException {
httpRequest = (HttpServletRequest) pageContext.getRequest();
requestContainer = ChannelUtilities.getRequestContainer(httpRequest);
responseContainer = ChannelUtilities.getResponseContainer(httpRequest);
urlBuilder = UrlBuilderFactory.getUrlBuilder();
msgBu... |
Inversion-Mutation | megadiff | "public void execute(Connection conn) {
try {
PreparedStatement s = conn.prepareStatement(query);
if (params != null) {
for (ISetter setter : params) {
s = setter.set(s);
}
}
for (PreparedStatementExecutionItem ei : executionItems)
s = ei.addToBatch(s);
if (query.toLowerCase(... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "execute" | "public void execute(Connection conn) {
try {
PreparedStatement s = conn.prepareStatement(query);
if (params != null) {
for (ISetter setter : params) {
s = setter.set(s);
}
}
for (PreparedStatementExecutionItem ei : executionItems)
s = ei.addToBatch(s);
if (query.toLowerCase(... |
Inversion-Mutation | megadiff | "@Test
public void testLogMonitorController() {
sleep(3000);
logMonitorController.enableVerbose(false);
StringBuffer buffer = new StringBuffer();
for (int i = 0; i < 100; i++) {
buffer.append("====================================");
}
CoreLogger.LOGGER.info(buffer.toString());
CoreLogger.LOGG... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "testLogMonitorController" | "@Test
public void testLogMonitorController() {
logMonitorController.enableVerbose(false);
StringBuffer buffer = new StringBuffer();
for (int i = 0; i < 100; i++) {
buffer.append("====================================");
}
CoreLogger.LOGGER.info(buffer.toString());
CoreLogger.LOGGER.info("Core L... |
Inversion-Mutation | megadiff | "public int getTotal()
{
int amount = 0;
for (Subpot pot : subpots)
{
amount += pot.getTotal();
// Add restAmount here, since Subpot does not know number of members
amount += (members.size() - pot.cases.size()) * pot.restAmount;
}
amount += tip;
return amount;
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getTotal" | "public int getTotal()
{
int amount = 0;
for (Subpot pot : subpots)
{
amount += pot.getTotal();
// Add restAmount here, since Subpot does not know number of members
amount += (members.size() - pot.cases.size()) * pot.restAmount;
<MASK>amount += tip;</MASK>
}
return amount;
}" |
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 void destroy() {
// the following doesn't fully clean up (maybe because of Java3D?)
WindowManager wm = (WindowManager) getManager(WindowManager.class);
wm.hideWindows();
setVisible(false);
wm.disposeWindows();
StateManager sm = (StateManager) getManager(StateManager.class);
s... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "destroy" | "public void destroy() {
// the following doesn't fully clean up (maybe because of Java3D?)
WindowManager wm = (WindowManager) getManager(WindowManager.class);
wm.hideWindows();
<MASK>wm.disposeWindows();</MASK>
setVisible(false);
StateManager sm = (StateManager) getManager(StateManager.c... |
Inversion-Mutation | megadiff | "private void selectableMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_selectableMouseClicked
if (evt.getClickCount() >= 2) { // Double click or faster
DefaultMutableTreeNode node = (DefaultMutableTreeNode)
selectable.getLastSelectedPathComponent();
if ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "selectableMouseClicked" | "private void selectableMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_selectableMouseClicked
if (evt.getClickCount() >= 2) { // Double click or faster
DefaultMutableTreeNode node = (DefaultMutableTreeNode)
selectable.getLastSelectedPathComponent();
if ... |
Inversion-Mutation | megadiff | "private SimpleFieldSet handleGetIdentitiesByScore(final SimpleFieldSet params) throws InvalidParameterException, UnknownIdentityException {
final String treeOwnerID = params.get("TreeOwner");
final String selection = getMandatoryParameter(params, "Selection");
final String context = getMandator... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "handleGetIdentitiesByScore" | "private SimpleFieldSet handleGetIdentitiesByScore(final SimpleFieldSet params) throws InvalidParameterException, UnknownIdentityException {
final String treeOwnerID = params.get("TreeOwner");
final String selection = getMandatoryParameter(params, "Selection");
final String context = getMandator... |
Inversion-Mutation | megadiff | "public String rewriteResourceURL(String path, String resourcebase) {
String resourceURL = null;
if (!URLUtil.isAbsolute(path) && path.charAt(0) != '/') {
if (isContextURL(path)) {
resourceURL = rewriteContextURL(path);
}
else {
resourceURL = viewstatehandler.encodeResou... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "rewriteResourceURL" | "public String rewriteResourceURL(String path, String resourcebase) {
String resourceURL = null;
if (!URLUtil.isAbsolute(path) && path.charAt(0) != '/') {
if (isContextURL(path)) {
resourceURL = rewriteContextURL(path);
}
else {
resourceURL = viewstatehandler.encodeResou... |
Inversion-Mutation | megadiff | "public boolean send(Object data, boolean close) throws IOException {
if (closedRan.get()) {
return false;
}
if (isWebSocket()) {
if (data instanceof Map) { // only get the :body if map
Object tmp = ((Map<Keyword, Object>) data).get(BODY);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "send" | "public boolean send(Object data, boolean close) throws IOException {
if (closedRan.get()) {
return false;
}
if (isWebSocket()) {
if (data instanceof Map) { // only get the :body if map
Object tmp = ((Map<Keyword, Object>) data).get(BODY);
... |
Inversion-Mutation | megadiff | "protected void tearDown() throws Exception {
this.region.close();
super.tearDown();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "tearDown" | "protected void tearDown() throws Exception {
<MASK>super.tearDown();</MASK>
this.region.close();
}" |
Inversion-Mutation | megadiff | "protected RelNode toLenientRel(
RelOptCluster cluster,
RelNode child,
RelDataType targetRowType,
RelDataType srcRowType)
{
ArrayList<RexNode> rexNodeList = new ArrayList();
RexBuilder rexBuilder = cluster.getRexBuilder();
FarragoWarningQueue warningQu... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "toLenientRel" | "protected RelNode toLenientRel(
RelOptCluster cluster,
RelNode child,
RelDataType targetRowType,
RelDataType srcRowType)
{
ArrayList<RexNode> rexNodeList = new ArrayList();
RexBuilder rexBuilder = cluster.getRexBuilder();
FarragoWarningQueue warningQu... |
Inversion-Mutation | megadiff | "public static Test suite() {
TestSuite suite = new TestSuite("Test for org.eclipse.mylyn.tests");
StatusHandler.addStatusHandler(new TestingStatusNotifier());
// ResourcesUiBridgePlugin.getDefault().setResourceMonitoringEnabled(false);
// TODO: the order of these tests might still matter, but shouldn't
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "suite" | "public static Test suite() {
TestSuite suite = new TestSuite("Test for org.eclipse.mylyn.tests");
StatusHandler.addStatusHandler(new TestingStatusNotifier());
// ResourcesUiBridgePlugin.getDefault().setResourceMonitoringEnabled(false);
// TODO: the order of these tests might still matter, but shouldn't
... |
Inversion-Mutation | megadiff | "private static void printUsage()
{
System.err.println("Utility to push analysis results to LIMS");
System.err.println();
System.err.println("Usage. Specify the following commannd line parameters :");
System.err.println();
System.err.println("DBName NewState FCLaneBarcode Key=value...");
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "printUsage" | "private static void printUsage()
{
System.err.println("Utility to push analysis results to LIMS");
System.err.println();
System.err.println("Usage. Specify the following commannd line parameters :");
System.err.println();
System.err.println("DBName NewState FCLaneBarcode Key=value...");
... |
Inversion-Mutation | megadiff | "public void renderToSheet(SpriteSheet sheet, PaletteResource pal, int sx,
int sy) {
this.sheet = sheet;
sheetX = sx;
sheetY = sy;
try {
int bits = 0;
int val = 0;
int pos = 0;
int pixel = 0;
if (direction == ImageDirection.LEFT_RIGHT) {
int xoffs = 8 / bpp - 1;
for (in... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "renderToSheet" | "public void renderToSheet(SpriteSheet sheet, PaletteResource pal, int sx,
int sy) {
this.sheet = sheet;
sheetX = sx;
sheetY = sy;
try {
int bits = 0;
int val = 0;
int pos = 0;
int pixel = 0;
if (direction == ImageDirection.LEFT_RIGHT) {
int xoffs = 8 / bpp - 1;
for (in... |
Inversion-Mutation | megadiff | "public boolean send(Object data, boolean close) throws IOException {
if (closedRan.get()) {
return false;
}
if (isWebSocket()) {
if (data instanceof Map) { // only get the :body if map
Object tmp = ((Map<Keyword, Object>) data).get(BODY);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "send" | "public boolean send(Object data, boolean close) throws IOException {
if (closedRan.get()) {
return false;
}
if (isWebSocket()) {
if (data instanceof Map) { // only get the :body if map
Object tmp = ((Map<Keyword, Object>) data).get(BODY);
... |
Inversion-Mutation | megadiff | "private void createProject() {
// get the target and try to resolve it.
int targetId = mSdkCommandLine.getParamTargetId();
IAndroidTarget[] targets = mSdkManager.getTargets();
if (targetId < 1 || targetId > targets.length) {
errorAndExit("Target id is not valid. Use '%s... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createProject" | "private void createProject() {
// get the target and try to resolve it.
int targetId = mSdkCommandLine.getParamTargetId();
IAndroidTarget[] targets = mSdkManager.getTargets();
if (targetId < 1 || targetId > targets.length) {
errorAndExit("Target id is not valid. Use '%s... |
Inversion-Mutation | megadiff | "public void record(final Player player, final Event event) {
final long occured = System.currentTimeMillis();
this.last.put(player, occured);
if (this.countObservers() == 0) return;
this.setChanged();
this.notifyObservers(new PlayerEvent(player, event, occured));
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "record" | "public void record(final Player player, final Event event) {
final long occured = System.currentTimeMillis();
this.last.put(player, occured);
<MASK>this.setChanged();</MASK>
if (this.countObservers() == 0) return;
this.notifyObservers(new PlayerEvent(player, event, o... |
Inversion-Mutation | megadiff | "@Override
public void onReceive(Context context, Intent intent) {
Bundle bundle = intent.getExtras();
if (bundle == null)
return;
Object[] pdus = (Object[]) bundle.get("pdus");
DBHelper helper = new DBHelper(context);
for (int i = 0; i < pdus.length; i++) ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onReceive" | "@Override
public void onReceive(Context context, Intent intent) {
Bundle bundle = intent.getExtras();
if (bundle == null)
return;
Object[] pdus = (Object[]) bundle.get("pdus");
DBHelper helper = new DBHelper(context);
for (int i = 0; i < pdus.length; i++) ... |
Inversion-Mutation | megadiff | "protected MaskedTextBox(TextBox textBox, Formatter formatter)
{
String id = textBox.getElement().getId();
if (id == null || id.length() == 0)
{
textBox.getElement().setId(generateNewId());
}
this.textBox = textBox;
this.textBox.setStyleName(DEFAULT_STYLE_NAME);
setFormatter(formatter);
i... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "MaskedTextBox" | "protected MaskedTextBox(TextBox textBox, Formatter formatter)
{
String id = textBox.getElement().getId();
if (id == null || id.length() == 0)
{
textBox.getElement().setId(generateNewId());
}
<MASK>setFormatter(formatter);</MASK>
this.textBox = textBox;
this.textBox.setStyleName(DEFAULT_STYLE... |
Inversion-Mutation | megadiff | "@Override
protected String doInBackground(final Person whoAmI)
{
String serverResponse = null;
try
{
final JSONObject boardJSON = board.makeJSON();
final String boardJSONString = boardJSON.toString();
final ArrayList<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();
nameV... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doInBackground" | "@Override
protected String doInBackground(final Person whoAmI)
{
String serverResponse = null;
try
{
final JSONObject boardJSON = board.makeJSON();
final String boardJSONString = boardJSON.toString();
final ArrayList<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();
nameV... |
Inversion-Mutation | megadiff | "@Override
public View getView(int position, View convertView, ViewGroup parent) {
View res;
final MagazineModel currentMagazine = magazine.get(position);
if(convertView == null){
res = LayoutInflater.from(context).inflate(R.layout.magazine_list_item, null);
} else {
res = convertView;
}
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getView" | "@Override
public View getView(int position, View convertView, ViewGroup parent) {
View res;
final MagazineModel currentMagazine = magazine.get(position);
if(convertView == null){
res = LayoutInflater.from(context).inflate(R.layout.magazine_list_item, null);
} else {
res = convertView;
}
... |
Inversion-Mutation | megadiff | "protected void onCreate ( Bundle savedInstanceState ) {
MoaiLog.i ( "MoaiActivity onCreate: activity CREATED" );
super.onCreate ( savedInstanceState );
Moai.onCreate ( this );
Moai.createContext ();
Moai.init ();
requestWindowFeature ( Window.FEATURE_NO_TITLE );
getWindow ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onCreate" | "protected void onCreate ( Bundle savedInstanceState ) {
MoaiLog.i ( "MoaiActivity onCreate: activity CREATED" );
super.onCreate ( savedInstanceState );
Moai.onCreate ( this );
<MASK>Moai.init ();</MASK>
Moai.createContext ();
requestWindowFeature ( Window.FEATURE_NO_TITLE );
... |
Inversion-Mutation | megadiff | "protected void repetitiveAssertPetclinicUrlIsAvailable() {
RepetitiveConditionProvider condition = new RepetitiveConditionProvider() {
@Override
public boolean getCondition() {
String spec = null;
try {
String hostAddress = tomcat.getInstances()[0].getGridServiceContainer().getMachine()... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "repetitiveAssertPetclinicUrlIsAvailable" | "protected void repetitiveAssertPetclinicUrlIsAvailable() {
RepetitiveConditionProvider condition = new RepetitiveConditionProvider() {
@Override
public boolean getCondition() {
String spec = null;
try {
String hostAddress = tomcat.getInstances()[0].getGridServiceContainer().getMachine()... |
Inversion-Mutation | megadiff | "@Override
public boolean getCondition() {
String spec = null;
try {
String hostAddress = tomcat.getInstances()[0].getGridServiceContainer().getMachine().getHostAddress();
spec = "http://" + hostAddress + ":8080/petclinic/";
LogUtils.log("Checking that url : " + spec + " is available");... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getCondition" | "@Override
public boolean getCondition() {
String spec = null;
try {
String hostAddress = tomcat.getInstances()[0].getGridServiceContainer().getMachine().getHostAddress();
<MASK>LogUtils.log("Checking that url : " + spec + " is available");</MASK>
spec = "http://" + hostAddress + ":8080/... |
Inversion-Mutation | megadiff | "@Override
public Family createMappedForm(PersistentEntity entity) {
ClassPropertyFetcher cpf = ClassPropertyFetcher.forClass(entity.getJavaClass());
final Closure value = cpf.getStaticPropertyValue(GormProperties.MAPPING, Closure.class);
if(value != null) {
final Region fam... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createMappedForm" | "@Override
public Family createMappedForm(PersistentEntity entity) {
ClassPropertyFetcher cpf = ClassPropertyFetcher.forClass(entity.getJavaClass());
final Closure value = cpf.getStaticPropertyValue(GormProperties.MAPPING, Closure.class);
if(value != null) {
final Region fam... |
Inversion-Mutation | megadiff | "private void onBufferDraw() {
if (mBuffer == null || mKeyboardChanged) {
mKeyboard.setKeyboardWidth(mViewWidth);
if (mBuffer == null || mKeyboardChanged &&
(mBuffer.getWidth() != getWidth() || mBuffer.getHeight() != getHeight())) {
// Make sure o... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onBufferDraw" | "private void onBufferDraw() {
if (mBuffer == null || mKeyboardChanged) {
mKeyboard.setKeyboardWidth(mViewWidth);
if (mBuffer == null || mKeyboardChanged &&
(mBuffer.getWidth() != getWidth() || mBuffer.getHeight() != getHeight())) {
// Make sure o... |
Inversion-Mutation | megadiff | "@Override
public SqlScript createCleanScript(JdbcTemplate jdbcTemplate) {
final List<String> allDropStatements = new ArrayList<String>();
allDropStatements.addAll(generateDropStatementsForObjectType(jdbcTemplate, "SEQUENCE", ""));
allDropStatements.addAll(generateDropStatementsForObject... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createCleanScript" | "@Override
public SqlScript createCleanScript(JdbcTemplate jdbcTemplate) {
final List<String> allDropStatements = new ArrayList<String>();
allDropStatements.addAll(generateDropStatementsForObjectType(jdbcTemplate, "SEQUENCE", ""));
allDropStatements.addAll(generateDropStatementsForObject... |
Inversion-Mutation | megadiff | "private void createProject() {
// get the target and try to resolve it.
int targetId = mSdkCommandLine.getParamTargetId();
IAndroidTarget[] targets = mSdkManager.getTargets();
if (targetId < 1 || targetId > targets.length) {
errorAndExit("Target id is not valid. Use '%s... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createProject" | "private void createProject() {
// get the target and try to resolve it.
int targetId = mSdkCommandLine.getParamTargetId();
IAndroidTarget[] targets = mSdkManager.getTargets();
if (targetId < 1 || targetId > targets.length) {
errorAndExit("Target id is not valid. Use '%s... |
Inversion-Mutation | megadiff | "@Override
public IMarkerResolution[] getResolutions(IMarker marker) {
ArrayList<IMarkerResolution> resolutions = new ArrayList<IMarkerResolution>();
int position = marker.getAttribute(IMarker.CHAR_START, 0);
try {
if(marker.getResource() instanceof IFile){
IFile file = (IFile)marker.getResource();
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getResolutions" | "@Override
public IMarkerResolution[] getResolutions(IMarker marker) {
ArrayList<IMarkerResolution> resolutions = new ArrayList<IMarkerResolution>();
int position = marker.getAttribute(IMarker.CHAR_START, 0);
try {
if(marker.getResource() instanceof IFile){
IFile file = (IFile)marker.getResource();
... |
Inversion-Mutation | megadiff | "private HaeinsaRowTransaction checkOrRecoverLock(HaeinsaTransaction tx,
byte[] row, HaeinsaTableTransaction tableState,
@Nullable HaeinsaRowTransaction rowState) throws IOException {
if (rowState != null && rowState.getCurrent() != null) {
// return rowState itself if rowState already exist and contains... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "checkOrRecoverLock" | "private HaeinsaRowTransaction checkOrRecoverLock(HaeinsaTransaction tx,
byte[] row, HaeinsaTableTransaction tableState,
@Nullable HaeinsaRowTransaction rowState) throws IOException {
if (rowState != null && rowState.getCurrent() != null) {
// return rowState itself if rowState already exist and contains... |
Inversion-Mutation | megadiff | "private void push(double x, double y) {
stack[stackptr++] = y;
stack[stackptr++] = x;
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "push" | "private void push(double x, double y) {
<MASK>stack[stackptr++] = x;</MASK>
stack[stackptr++] = y;
}" |
Inversion-Mutation | megadiff | "@SuppressWarnings("unchecked")
protected AbstractBeanDefinition parseInternal(final Element element, final ParserContext parserContext) {
// this is the bean peforming the registration of custom listeners
BeanDefinitionBuilder listenerRegBean = BeanDefinitionBuilder.rootBeanDefinition(CustomList... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "parseInternal" | "@SuppressWarnings("unchecked")
protected AbstractBeanDefinition parseInternal(final Element element, final ParserContext parserContext) {
// this is the bean peforming the registration of custom listeners
BeanDefinitionBuilder listenerRegBean = BeanDefinitionBuilder.rootBeanDefinition(CustomList... |
Inversion-Mutation | megadiff | "public static byte[] encodeArtDmxPacket(final String univers, final String network, final int dmx[] ) throws IOException {
final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
// Prepare next trame
artDmxCounter++;
// ID.
byteArrayOutputStream.write(ByteUtils.toByta(C... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "encodeArtDmxPacket" | "public static byte[] encodeArtDmxPacket(final String univers, final String network, final int dmx[] ) throws IOException {
final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
// Prepare next trame
artDmxCounter++;
// ID.
byteArrayOutputStream.write(ByteUtils.toByta(C... |
Inversion-Mutation | megadiff | "private void doConnect() {
if (mConnectingThread != null) {
// a connection is still goign on!
return;
}
mLastConnectionError = getString(R.string.conn_connecting);
updateServiceNotification();
if (mSmackable != null) {
mSmackable.unRegisterCallback();
}
mConnectingThread = new Th... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doConnect" | "private void doConnect() {
if (mConnectingThread != null) {
// a connection is still goign on!
return;
}
mLastConnectionError = getString(R.string.conn_connecting);
updateServiceNotification();
if (mSmackable != null) {
mSmackable.unRegisterCallback();
}
<MASK>createAdapter();</MASK>... |
Inversion-Mutation | megadiff | "public static void main(String[] args) throws FileNotFoundException, IOException, KettleXMLException
{
Properties properties = new Properties();
properties.load(new FileInputStream(new File(args[0])));
SharedObjects sharedObjects = new SharedObjects(args[1], new ArrayList(), new Hasht... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "main" | "public static void main(String[] args) throws FileNotFoundException, IOException, KettleXMLException
{
Properties properties = new Properties();
properties.load(new FileInputStream(new File(args[0])));
SharedObjects sharedObjects = new SharedObjects(args[1], new ArrayList(), new Hasht... |
Inversion-Mutation | megadiff | "public void propertyChange(PropertyChangeEvent evt) {
if ("model".equals(evt.getPropertyName())) {
hidePopup();
if (evt.getOldValue() instanceof ComboBoxModel) {
((ComboBoxModel) evt.getOldValue()).removeListDataListener(this);
}
if (evt... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "propertyChange" | "public void propertyChange(PropertyChangeEvent evt) {
if ("model".equals(evt.getPropertyName())) {
hidePopup();
if (evt.getOldValue() instanceof ComboBoxModel) {
((ComboBoxModel) evt.getOldValue()).removeListDataListener(this);
}
if (evt... |
Inversion-Mutation | megadiff | "@SuppressWarnings( "unchecked" )
public Collection<File> buildClasspathList( final MavenProject project, final String scope,
Set<Artifact> artifacts )
throws ClasspathBuilderException
{
getLogger().debug( "establishing classpath list (scope =... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "buildClasspathList" | "@SuppressWarnings( "unchecked" )
public Collection<File> buildClasspathList( final MavenProject project, final String scope,
Set<Artifact> artifacts )
throws ClasspathBuilderException
{
getLogger().debug( "establishing classpath list (scope =... |
Inversion-Mutation | megadiff | "@Override
public boolean onCommand(final CommandSender sender, Command cmd, String label, String[] args) {
// If the player typed /tardis then do the following...
// check there is the right number of arguments
if (cmd.getName().equalsIgnoreCase("tardis")) {
Player player =... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onCommand" | "@Override
public boolean onCommand(final CommandSender sender, Command cmd, String label, String[] args) {
// If the player typed /tardis then do the following...
// check there is the right number of arguments
if (cmd.getName().equalsIgnoreCase("tardis")) {
Player player =... |
Inversion-Mutation | megadiff | "public void deselectUser(String postId){
bodyHtml = "";
if(mThreadView != null){
this.getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
aq.find(R.id.thread_userpost_notice).gone();
mThreadView.loadUrl(... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "deselectUser" | "public void deselectUser(String postId){
bodyHtml = "";
<MASK>aq.find(R.id.thread_userpost_notice).gone();</MASK>
if(mThreadView != null){
this.getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
mThr... |
Inversion-Mutation | megadiff | "public void onPlayerJoin(PlayerJoinEvent event){
if (!plugin.isEnabled()) return;
if (plugin.poller.isPanicing() && ! event.getPlayer().isOp()){
event.getPlayer().kickPlayer("Sorry mate, the server is in Memory Panic. Try again later.");
event.setJoinMessage(ChatColor.RED+event.getPlayer().getName()+" j... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onPlayerJoin" | "public void onPlayerJoin(PlayerJoinEvent event){
if (!plugin.isEnabled()) return;
if (plugin.poller.isPanicing() && ! event.getPlayer().isOp()){
event.getPlayer().kickPlayer("Sorry mate, the server is in Memory Panic. Try again later.");
}
<MASK>event.setJoinMessage(ChatColor.RED+event.getPlayer().ge... |
Inversion-Mutation | megadiff | "@Override
public void draw(){
glMatrixMode(GL_MODELVIEW);
glPushMatrix(); {
glTranslated(x, y, z);
fb.put(rotMatrix);
fb.flip();
glMultMatrix(fb);
drawGeometry();
} glPopMatrix();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "draw" | "@Override
public void draw(){
glPushMatrix(); {
<MASK>glMatrixMode(GL_MODELVIEW);</MASK>
glTranslated(x, y, z);
fb.put(rotMatrix);
fb.flip();
glMultMatrix(fb);
drawGeometry();
} glPopMatrix();
}" |
Inversion-Mutation | megadiff | "public int compare( Object o1, Object o2 )
{
Object[] sortKeys1 = ( (GroupBoundaryInfo) o1 ).getSortKeys( );
Object[] sortKeys2 = ( (GroupBoundaryInfo) o2 ).getSortKeys( );
boolean[] sortDirection = ( (GroupBoundaryInfo) o1 ).getSortDirection( );
Comparator[] comparator = ( (GroupBoundaryInfo) o1 ).getCo... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "compare" | "public int compare( Object o1, Object o2 )
{
Object[] sortKeys1 = ( (GroupBoundaryInfo) o1 ).getSortKeys( );
Object[] sortKeys2 = ( (GroupBoundaryInfo) o2 ).getSortKeys( );
boolean[] sortDirection = ( (GroupBoundaryInfo) o1 ).getSortDirection( );
Comparator[] comparator = ( (GroupBoundaryInfo) o1 ).getCo... |
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 void start() throws Exception {
if(running == true) {
throw new Exception("Deacon is already running!");
}
// Check to see if a timeout is set and it is expired
if((this.catchUpTimeOut != 0) && (this.lastStop != 0)) {
// Deacon is "resuming" from a previous stop
long timedelta = System.c... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "start" | "public void start() throws Exception {
if(running == true) {
throw new Exception("Deacon is already running!");
}
// Check to see if a timeout is set and it is expired
if((this.catchUpTimeOut != 0) && (this.lastStop != 0)) {
// Deacon is "resuming" from a previous stop
long timedelta = System.c... |
Inversion-Mutation | megadiff | "public void run() {
InputStream is = null;
RandomAccessFile randomAccessFile = null;
try {
int startPos = downinfo.getCompletesize()*1024;
int endPos = downinfo.getFilesize()*1024;
is = mService.getPushDownLoadInputStream(downinfo.getUrl(), startPos, endPos);
boolean isBreakPoint = mSer... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "public void run() {
InputStream is = null;
RandomAccessFile randomAccessFile = null;
try {
int startPos = downinfo.getCompletesize()*1024;
int endPos = downinfo.getFilesize()*1024;
is = mService.getPushDownLoadInputStream(downinfo.getUrl(), startPos, endPos);
boolean isBreakPoint = mSer... |
Inversion-Mutation | megadiff | "private SimpleFieldSet handleGetIdentitiesByScore(final SimpleFieldSet params) throws InvalidParameterException, UnknownIdentityException {
final String treeOwnerID = params.get("TreeOwner");
final String selection = getMandatoryParameter(params, "Selection");
final String context = getMandator... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "handleGetIdentitiesByScore" | "private SimpleFieldSet handleGetIdentitiesByScore(final SimpleFieldSet params) throws InvalidParameterException, UnknownIdentityException {
final String treeOwnerID = params.get("TreeOwner");
final String selection = getMandatoryParameter(params, "Selection");
final String context = getMandator... |
Inversion-Mutation | megadiff | "public Card(JsonObject obj){
this.name = obj.has(PROP_CARD_NAME) ? obj.getAsJsonPrimitive(PROP_CARD_NAME).getAsString() : "";
this.color = obj.has(PROP_CARD_COLOR) ? obj.getAsJsonPrimitive(PROP_CARD_COLOR).getAsString() : "";
this.cost = convertJSONToAssetMap(obj, PROP_CARD_COST);
t... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "Card" | "public Card(JsonObject obj){
this.name = obj.has(PROP_CARD_NAME) ? obj.getAsJsonPrimitive(PROP_CARD_NAME).getAsString() : "";
this.color = obj.has(PROP_CARD_COLOR) ? obj.getAsJsonPrimitive(PROP_CARD_COLOR).getAsString() : "";
this.cost = convertJSONToAssetMap(obj, PROP_CARD_COST);
t... |
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 UserVO updateUser(long userId, AccessLevel accessLevel, int invites) {
final UserVO user = findUserBy(userId);
user.setAccessLevel(accessLevel);
userDao.store(user);
UserProfile userProfile = getUserProfile(user.getUserName());
//errors can occur where user is saved without profile
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "updateUser" | "public UserVO updateUser(long userId, AccessLevel accessLevel, int invites) {
final UserVO user = findUserBy(userId);
user.setAccessLevel(accessLevel);
userDao.store(user);
UserProfile userProfile = getUserProfile(user.getUserName());
//errors can occur where user is saved without profile
... |
Inversion-Mutation | megadiff | "public void start() {
m_Listener = new Thread(this);
m_Listening.set(true);
m_Listener.start();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "start" | "public void start() {
m_Listener = new Thread(this);
<MASK>m_Listener.start();</MASK>
m_Listening.set(true);
}" |
Inversion-Mutation | megadiff | "private void vmExecute(int nexeccalls)
{
// This labelled while loop is used to simulate the effect of C's
// goto. The end of the while loop is never reached. The beginning
// of the while loop is branched to using a "continue reentry;"
// statement (when a Lua function is called or returns).... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "vmExecute" | "private void vmExecute(int nexeccalls)
{
// This labelled while loop is used to simulate the effect of C's
// goto. The end of the while loop is never reached. The beginning
// of the while loop is branched to using a "continue reentry;"
// statement (when a Lua function is called or returns).... |
Inversion-Mutation | megadiff | "public synchronized Future<?> addIndexedColumn(ColumnDefinition cdef)
{
if (indexesByColumn.containsKey(cdef.name))
return null;
assert cdef.getIndexType() != null;
SecondaryIndex index;
try
{
index = SecondaryIndex.createInstance(baseC... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "addIndexedColumn" | "public synchronized Future<?> addIndexedColumn(ColumnDefinition cdef)
{
if (indexesByColumn.containsKey(cdef.name))
return null;
assert cdef.getIndexType() != null;
<MASK>logger.info("Creating new index : {}",cdef);</MASK>
SecondaryIndex index;
try
... |
Inversion-Mutation | megadiff | "public void run()
{
try
{
log.info("Starting Thread " + threadId);
synchronized (startSemaphore)
{
if (!started)
{
startSemaphore.wait();
}
}
//log.info("Thread... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "public void run()
{
try
{
log.info("Starting Thread " + threadId);
synchronized (startSemaphore)
{
if (!started)
{
startSemaphore.wait();
}
}
//log.info("Thread... |
Inversion-Mutation | megadiff | "public void setAllPersons(List<Person> persons) {
this.persons = persons;
for (Person person : persons) {
if (person.getUsername().equals(username)) {
user = person;
}
selected.add(false);
}
persons.remove(user);
persons.add(user);
selected.set(selected.size()-1, true);
pcs.fireP... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setAllPersons" | "public void setAllPersons(List<Person> persons) {
this.persons = persons;
for (Person person : persons) {
if (person.getUsername().equals(username)) {
user = person;
<MASK>selected.add(false);</MASK>
}
}
persons.remove(user);
persons.add(user);
selected.set(selected.size()-1, true)... |
Inversion-Mutation | megadiff | "protected void createTrimWidgets(Shell shell) {
if (menuBarManager != null) {
shell.setMenuBar(menuBarManager.createMenuBar((Decorations) shell));
menuBarManager.updateAll(true);
}
if (showTopSeperator()) {
seperator1 = new Label(shell, SWT.SEPARATOR | SWT.HORIZ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createTrimWidgets" | "protected void createTrimWidgets(Shell shell) {
if (menuBarManager != null) {
menuBarManager.updateAll(true);
<MASK>shell.setMenuBar(menuBarManager.createMenuBar((Decorations) shell));</MASK>
}
if (showTopSeperator()) {
seperator1 = new Label(shell, SWT.SEPAR... |
Inversion-Mutation | megadiff | "protected void endJob(InternalJob job, IStatus result, boolean notify) {
InternalJob blocked = null;
int blockedJobCount = 0;
long rescheduleDelay = InternalJob.T_NONE;
synchronized (lock) {
//if the job is finishing asynchronously, there is nothing more to do for now
if (result == Job.ASYNC_FINISH... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "endJob" | "protected void endJob(InternalJob job, IStatus result, boolean notify) {
InternalJob blocked = null;
int blockedJobCount = 0;
long rescheduleDelay = InternalJob.T_NONE;
synchronized (lock) {
//if the job is finishing asynchronously, there is nothing more to do for now
if (result == Job.ASYNC_FINISH... |
Inversion-Mutation | megadiff | "public IHyperlink[] detectHyperlinks(ITextViewer textViewer, IRegion region,
boolean canShowMultipleHyperlinks) {
final ITextEditor textEditor = (ITextEditor)getAdapter(ITextEditor.class);
// shortcut : do not show links for non relevant chars (dot, arrows, ...)
boolean shortcut = false;
if (region == ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "detectHyperlinks" | "public IHyperlink[] detectHyperlinks(ITextViewer textViewer, IRegion region,
boolean canShowMultipleHyperlinks) {
final ITextEditor textEditor = (ITextEditor)getAdapter(ITextEditor.class);
// shortcut : do not show links for non relevant chars (dot, arrows, ...)
boolean shortcut = false;
if (region == ... |
Inversion-Mutation | megadiff | "private HazelcastHttpSession getSessionWithId(final String sessionId) {
HazelcastHttpSession session = mapSessions.get(sessionId);
if (session != null && !session.isValid()) {
destroySession(session, true);
session = null;
}
return session;
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getSessionWithId" | "private HazelcastHttpSession getSessionWithId(final String sessionId) {
HazelcastHttpSession session = mapSessions.get(sessionId);
if (session != null && !session.isValid()) {
<MASK>session = null;</MASK>
destroySession(session, true);
}
return session;
... |
Inversion-Mutation | megadiff | "public void testOverriddenEntityName() {
emf.createEntityManager().close();
ClassMetaData meta = JPAFacadeHelper.getMetaData(emf,
XmlOverrideEntity.class);
assertEquals("XmlOverride", meta.getTypeAlias());
MetaDataRepository repo = emf.getConfiguration()
.... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "testOverriddenEntityName" | "public void testOverriddenEntityName() {
ClassMetaData meta = JPAFacadeHelper.getMetaData(emf,
XmlOverrideEntity.class);
assertEquals("XmlOverride", meta.getTypeAlias());
<MASK>emf.createEntityManager().close();</MASK>
MetaDataRepository repo = emf.getConfiguration()
... |
Inversion-Mutation | megadiff | "@EventHandler(priority = EventPriority.NORMAL)
public void explodingArrow(ProjectileHitEvent event) {
Entity projectile = event.getEntity();
World w = projectile.getWorld();
Location hit = projectile.getLocation();
if (w.getName().equals(name)) {
if (projectile... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "explodingArrow" | "@EventHandler(priority = EventPriority.NORMAL)
public void explodingArrow(ProjectileHitEvent event) {
Entity projectile = event.getEntity();
World w = projectile.getWorld();
Location hit = projectile.getLocation();
if (w.getName().equals(name)) {
if (projectile... |
Inversion-Mutation | megadiff | "public void decode(String batchFile) {
BatchItem batchItem;
int count = 0;
try {
recognizer.allocate();
setBatchFile(batchFile);
batchManager.start();
logger.info("BatchDecoder: decoding files in "
+ batchManager.getF... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "decode" | "public void decode(String batchFile) {
BatchItem batchItem;
int count = 0;
try {
recognizer.allocate();
setBatchFile(batchFile);
batchManager.start();
logger.info("BatchDecoder: decoding files in "
+ batchManager.getF... |
Inversion-Mutation | megadiff | "public final void play() {
p.pushMatrix();
senescence();
update();
render();
p.popMatrix();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "play" | "public final void play() {
senescence();
update();
<MASK>p.pushMatrix();</MASK>
render();
p.popMatrix();
}" |
Inversion-Mutation | megadiff | "@Override
public int onStartCommand(Intent intent, int flags, int startId) {
// Debug
if (Config.LOGD) {
Log.d(TAG, "[fn] onStartCommand");
}
super.onStartCommand(intent, flags, startId);
initVars();
if (intent.getBooleanExtra(STOP_LOCATION_LISTENING, false)) {
stopLo... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onStartCommand" | "@Override
public int onStartCommand(Intent intent, int flags, int startId) {
// Debug
if (Config.LOGD) {
Log.d(TAG, "[fn] onStartCommand");
}
super.onStartCommand(intent, flags, startId);
initVars();
if (intent.getBooleanExtra(STOP_LOCATION_LISTENING, false)) {
stopLo... |
Inversion-Mutation | megadiff | "public static Object run(String applicationName/*R1.0 compatibility*/, URL pluginPathLocation/*R1.0 compatibility*/, String location, String[] args, Runnable handler) throws Exception {
Object result = null;
applicationR10 = applicationName; // for R1.0 compatibility
String[] applicationArgs = startup(pluginPath... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "public static Object run(String applicationName/*R1.0 compatibility*/, URL pluginPathLocation/*R1.0 compatibility*/, String location, String[] args, Runnable handler) throws Exception {
Object result = null;
applicationR10 = applicationName; // for R1.0 compatibility
String[] applicationArgs = startup(pluginPath... |
Inversion-Mutation | megadiff | "public void visitLobject(Lobject frame) {
Exp standardClassSymbol = frame.getParent().internString(Constants.STANDARDCLASS);
Lobject standardClass;
try {
standardClass = (Lobject) frame.getParent().lookupVariableValue(standardClassSymbol);
if (frame.isTaggedWith(sta... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "visitLobject" | "public void visitLobject(Lobject frame) {
Exp standardClassSymbol = frame.getParent().internString(Constants.STANDARDCLASS);
Lobject standardClass;
try {
standardClass = (Lobject) frame.getParent().lookupVariableValue(standardClassSymbol);
if (frame.isTaggedWith(sta... |
Inversion-Mutation | megadiff | "protected ListItem addItem(Object value, boolean newItem) {
ListItem item = createItem();
Editor editor = (Editor) itemElementFactory.createElement(
item, getForm(), false);
item.setEditor(editor);
container.addElement(item);
item.setValue(value, newItem);
return item;
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "addItem" | "protected ListItem addItem(Object value, boolean newItem) {
ListItem item = createItem();
Editor editor = (Editor) itemElementFactory.createElement(
item, getForm(), false);
item.setEditor(editor);
item.setValue(value, newItem);
<MASK>container.addElement(item);</MASK>
return item;
}" |
Inversion-Mutation | megadiff | "public static Date parse(String date, List<String> formats) {
Date result = null;
if (date == null) {
throw new IllegalArgumentException("Date is null");
}
String format = null;
int formatsSize = formats.size();
for (int i = 0; (result == null) &... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "parse" | "public static Date parse(String date, List<String> formats) {
Date result = null;
if (date == null) {
throw new IllegalArgumentException("Date is null");
}
String format = null;
int formatsSize = formats.size();
for (int i = 0; (result == null) &... |
Inversion-Mutation | megadiff | "@Override
public void run() {
Thread.currentThread().setName("JobRunner-" + this.jobId + "-" + executionId);
// If the job is cancelled, disabled, killed. No log is created in this case
if (handleNonReadyStatus()) {
return;
}
createAttachmentFile();
createLogger();
boolean errorFound =... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "@Override
public void run() {
Thread.currentThread().setName("JobRunner-" + this.jobId + "-" + executionId);
// If the job is cancelled, disabled, killed. No log is created in this case
if (handleNonReadyStatus()) {
return;
}
createAttachmentFile();
createLogger();
boolean errorFound =... |
Inversion-Mutation | megadiff | "public void resumeGame() {
gamestate = GameState.RUNNING;
stateManager.attach(gameInputAppState);
bulletAppState.setEnabled(true);
startInputSender();
menuController.actualizeScreen();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "resumeGame" | "public void resumeGame() {
gamestate = GameState.RUNNING;
<MASK>menuController.actualizeScreen();</MASK>
stateManager.attach(gameInputAppState);
bulletAppState.setEnabled(true);
startInputSender();
}" |
Inversion-Mutation | megadiff | "public void onDiceRolled() {
// play possible animations/sound here
state.activeSelection().roll();
state.rollHistory().add(0, new SetSelection(state.activeSelection()));
if (state.rollHistory().size() > 20)
state.rollHistory().remove(20);
statistics.update(... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onDiceRolled" | "public void onDiceRolled() {
// play possible animations/sound here
state.rollHistory().add(0, new SetSelection(state.activeSelection()));
if (state.rollHistory().size() > 20)
state.rollHistory().remove(20);
<MASK>state.activeSelection().roll();</MASK>
stati... |
Inversion-Mutation | megadiff | "public void load(Element parent, ICharacter character) throws PersistenceException {
try {
Element statisticsElement = parent.element(TAG_STATISTICS);
if (statisticsElement == null) {
return;
}
ITemplateType templateType = loadTemplateType(statisticsElement);
boolean ex... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "load" | "public void load(Element parent, ICharacter character) throws PersistenceException {
try {
Element statisticsElement = parent.element(TAG_STATISTICS);
if (statisticsElement == null) {
return;
}
ITemplateType templateType = loadTemplateType(statisticsElement);
boolean ex... |
Inversion-Mutation | megadiff | "public DialogAdd(final GUI main) {
super(main, GUIADD);
final BaseXBack pp = new BaseXBack(new TableLayout(7, 2, 0, 4));
pp.add(new BaseXLabel(CREATETITLE));
pp.add(new BaseXLabel(" "));
file = new BaseXTextField(this);
pp.add(file);
final BaseXButton browse = new BaseXButton(B... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "DialogAdd" | "public DialogAdd(final GUI main) {
super(main, GUIADD);
final BaseXBack pp = new BaseXBack(new TableLayout(7, 2, 0, 4));
pp.add(new BaseXLabel(CREATETITLE));
<MASK>pp.add(new BaseXLabel(" "));</MASK>
file = new BaseXTextField(this);
pp.add(file);
final BaseXButton browse = new ... |
Inversion-Mutation | megadiff | "public PortShop(NewWindowManager parent,PortEntity pe) {
super(parent);
parent.add(this);
setSize(500, 250);
setLoc(390, 275);
setText("Port Shop");
port = pe;
initItems();
current = null;
if(port == null){
super.setVisible(false);
}
else{
super.setVisible(tr... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "PortShop" | "public PortShop(NewWindowManager parent,PortEntity pe) {
super(parent);
parent.add(this);
setSize(500, 250);
setLoc(390, 275);
setText("Port Shop");
initItems();
<MASK>port = pe;</MASK>
current = null;
if(port == null){
super.setVisible(false);
}
else{
super.... |
Inversion-Mutation | megadiff | "public boolean contains(float x, float y) {
checkPoints();
if (points.length == 0) {
return false;
}
boolean result = false;
float xnew,ynew;
float xold,yold;
float x1,y1;
float x2,y2;
int npoints = points.length;
xold=po... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "contains" | "public boolean contains(float x, float y) {
if (points.length == 0) {
return false;
}
<MASK>checkPoints();</MASK>
boolean result = false;
float xnew,ynew;
float xold,yold;
float x1,y1;
float x2,y2;
int npoints = points.length;
... |
Inversion-Mutation | megadiff | "public TMIClient(final String channelName, final String accountName, final String accountPassword) {
this.channelName = channelName;
this.accountName = accountName;
this.accountPassword = accountPassword;
setupHandlers();
ops = new HashSet<User>();
connection... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "TMIClient" | "public TMIClient(final String channelName, final String accountName, final String accountPassword) {
this.channelName = channelName;
this.accountName = accountName;
this.accountPassword = accountPassword;
setupHandlers();
ops = new HashSet<User>();
connection... |
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 StarTable[] makeStarTables( DataSource datsrc,
StoragePolicy storagePolicy)
throws IOException {
/* If there is a position, use makeStarTable. Otherwise, we want
* all the tables. */
String srcpos = datsrc.getPosition();
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "makeStarTables" | "public StarTable[] makeStarTables( DataSource datsrc,
StoragePolicy storagePolicy)
throws IOException {
/* If there is a position, use makeStarTable. Otherwise, we want
* all the tables. */
String srcpos = datsrc.getPosition();
... |
Inversion-Mutation | megadiff | "public void close(){
IStreamService streamService = (IStreamService) getScopeService(scope, IStreamService.STREAM_SERVICE, StreamService.class);
if (streamService != null) {
synchronized (streams) {
for(int i=0; i<streams.length; i++){
IClientStream stream = streams[i];
if(stream != null) {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "close" | "public void close(){
IStreamService streamService = (IStreamService) getScopeService(scope, IStreamService.STREAM_SERVICE, StreamService.class);
if (streamService != null) {
synchronized (streams) {
for(int i=0; i<streams.length; i++){
IClientStream stream = streams[i];
if(stream != null) {
... |
Inversion-Mutation | megadiff | "private FloorState[] initializeFloorStates(ElevatorGame game, Integer floorNb) {
final FloorState[] floorStates = new FloorState[floorNb];
for (Integer floor = LOWER_FLOOR; floor <= HIGHER_FLOOR; floor++) { // FIXME things goes wrong if LOWER_FLOOR is not zero
floorStates[floor] = new Fl... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "initializeFloorStates" | "private FloorState[] initializeFloorStates(ElevatorGame game, Integer floorNb) {
final FloorState[] floorStates = new FloorState[floorNb];
for (Integer floor = LOWER_FLOOR; floor <= HIGHER_FLOOR; floor++) { // FIXME things goes wrong if LOWER_FLOOR is not zero
floorStates[floor] = new Fl... |
Inversion-Mutation | megadiff | "@Override
public void Act() {
if (Input.IsActive(Commands.Start, _parent.GetPlayerIndex())) {
_parent.SetPlaying(true);
}
if (Input.IsActive(Commands.Back, _parent.GetPlayerIndex())) {
_parent.SetPlaying(false);
}
if (_parent.IsPlaying()) {
if (!Input.IsContext(Contexts.Inventory, _parent.... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "Act" | "@Override
public void Act() {
if (Input.IsActive(Commands.Start, _parent.GetPlayerIndex())) {
_parent.SetPlaying(true);
}
if (Input.IsActive(Commands.Back, _parent.GetPlayerIndex())) {
_parent.SetPlaying(false);
}
if (_parent.IsPlaying()) {
if (!Input.IsContext(Contexts.Inventory, _parent.... |
Inversion-Mutation | megadiff | "@EventHandler
public void onPlayerHitSign(PlayerInteractEvent event) {
if (event.getAction().equals(Action.RIGHT_CLICK_BLOCK) || event.getAction().equals(Action.LEFT_CLICK_BLOCK)) {
Block b = event.getClickedBlock();
if (b.getType().equals(Material.SIGN) || b.getType().equals(Ma... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onPlayerHitSign" | "@EventHandler
public void onPlayerHitSign(PlayerInteractEvent event) {
if (event.getAction().equals(Action.RIGHT_CLICK_BLOCK) || event.getAction().equals(Action.LEFT_CLICK_BLOCK)) {
Block b = event.getClickedBlock();
if (b.getType().equals(Material.SIGN) || b.getType().equals(Ma... |
Inversion-Mutation | megadiff | "public void test() throws Exception {
testTransaction(false);
testCreateDrop();
if (config.memory) {
return;
}
testMultiThreaded();
testStreamLob();
test(false, "VARCHAR");
test(false, "CLOB");
testPerformance(false);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "test" | "public void test() throws Exception {
testTransaction(false);
<MASK>testTransaction(true);</MASK>
testCreateDrop();
if (config.memory) {
return;
}
testMultiThreaded();
testStreamLob();
test(false, "VARCHAR");
test(false, "CLO... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.