type stringclasses 1
value | dataset stringclasses 1
value | input stringlengths 75 160k | instruction stringlengths 117 171 | output stringlengths 88 168k |
|---|---|---|---|---|
Inversion-Mutation | megadiff | "public V put(K key, V value) {
// TODO
if(key == null) {
throw new NullPointerException("Key == null");
}
if(size == data.length) adjustArrayLength();
int iOf = indexOf(key);
if(iOf == -1) {
data[size++] = new Entry<K,V>(key, value);
return null;
} else {
V valueBefore = data[iOf]... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "put" | "public V put(K key, V value) {
// TODO
<MASK>if(size == data.length) adjustArrayLength();</MASK>
if(key == null) {
throw new NullPointerException("Key == null");
}
int iOf = indexOf(key);
if(iOf == -1) {
data[size++] = new Entry<K,V>(key, value);
return null;
} else {
V valueBefor... |
Inversion-Mutation | megadiff | "public static void showExportImageDialog(JFrame owner, ImageModel model) throws IOException {
JFileChooser chooser = model.getSource() != null ? new JFileChooser(model.getSource().getParentFile()) : new JFileChooser();
chooser.setFileFilter(new FileNameExtensionFilter("PNG Image", EXPORT_EXTENSION));
chooser.... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "showExportImageDialog" | "public static void showExportImageDialog(JFrame owner, ImageModel model) throws IOException {
JFileChooser chooser = model.getSource() != null ? new JFileChooser(model.getSource().getParentFile()) : new JFileChooser();
chooser.setFileFilter(new FileNameExtensionFilter("PNG Image", EXPORT_EXTENSION));
chooser.... |
Inversion-Mutation | megadiff | "private MainFrame() {
super();
setIconImage(Toolkit.getDefaultToolkit().getImage(MainFrame.class.getResource("/org/concord/energy3d/resources/icons/energy3d_2.gif")));
System.out.print("Initiating GUI...");
try {
fileChooser = new JFileChooser();
if (!Config.isWebStart()) {
final File dir = n... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "MainFrame" | "private MainFrame() {
super();
setIconImage(Toolkit.getDefaultToolkit().getImage(MainFrame.class.getResource("/org/concord/energy3d/resources/icons/energy3d_2.gif")));
System.out.print("Initiating GUI...");
try {
if (!Config.isWebStart()) {
<MASK>fileChooser = new JFileChooser();</MASK>
fina... |
Inversion-Mutation | megadiff | "public void run() {
ProcessBuilder pb = new ProcessBuilder(cmdArray);
try {
PMS.info("Starting " + cmdLine);
if (params.outputFile != null && params.outputFile.getParentFile().isDirectory())
pb.directory(params.outputFile.getParentFile());
if (params.workDir != null && params.workDir.isDirectory... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "public void run() {
ProcessBuilder pb = new ProcessBuilder(cmdArray);
try {
PMS.info("Starting " + cmdLine);
if (params.outputFile != null && params.outputFile.getParentFile().isDirectory())
pb.directory(params.outputFile.getParentFile());
if (params.workDir != null && params.workDir.isDirectory... |
Inversion-Mutation | megadiff | "@Override
public Message post(final String text) throws MessagePostException {
if (text.isEmpty()) {
throw new MessagePostException("some message content is required");
}
if (!NetboutUtils.participantOf(this.viewer, this).confirmed()) {
throw new IllegalStateEx... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "post" | "@Override
public Message post(final String text) throws MessagePostException {
if (text.isEmpty()) {
throw new MessagePostException("some message content is required");
}
if (!NetboutUtils.participantOf(this.viewer, this).confirmed()) {
throw new IllegalStateEx... |
Inversion-Mutation | megadiff | "private void getGroupCompetitionResults(Table table, int row) {
try {
List runs = new ArrayList(getRunBiz().getRunnersByDistance(distance, null));
Map runGroups = new HashMap();
RunGroupMap map = new RunGroupMap();
Iterator iterator = runs.iterator();
while (iterator.hasNext()) {
Run r... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getGroupCompetitionResults" | "private void getGroupCompetitionResults(Table table, int row) {
try {
List runs = new ArrayList(getRunBiz().getRunnersByDistance(distance, null));
Map runGroups = new HashMap();
RunGroupMap map = new RunGroupMap();
Iterator iterator = runs.iterator();
while (iterator.hasNext()) {
Run r... |
Inversion-Mutation | megadiff | "@Override
@EventType(event = EventField.Command)
public void runEvent(CommandEvent event) {
Sender target = event.getChannel();
if (target == null) {
target = event.getSender();
if (target == null) {
return;
}
}
targ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "runEvent" | "@Override
@EventType(event = EventField.Command)
public void runEvent(CommandEvent event) {
Sender target = event.getChannel();
if (target == null) {
target = event.getSender();
if (target == null) {
return;
}
<MASK>target... |
Inversion-Mutation | megadiff | "public HelpCommand(MultiverseCore plugin) {
super(plugin);
this.setName("Get Help with Multiverse");
this.setCommandUsage("/mv " + ChatColor.GOLD + "[PAGE #]");
this.setArgRange(0, 1);
this.addKey("mv help");
this.addKey("mv");
this.addKey("mvhelp");
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "HelpCommand" | "public HelpCommand(MultiverseCore plugin) {
super(plugin);
this.setName("Get Help with Multiverse");
this.setCommandUsage("/mv " + ChatColor.GOLD + "[PAGE #]");
this.setArgRange(0, 1);
this.addKey("mv");
this.addKey("mvhelp");
<MASK>this.addKey("mv help")... |
Inversion-Mutation | megadiff | "public SyntaxTreeMouseImpl getSyntaxTreeWithCompress() {
cleanUpInvalidBranch(current);
fixMemoizedBranch(current);
sortBranch(current);
Debug.dump(current);
cleanUpFailedBranch(current);
cleanUpEmptyBranch(current);
compressBranch(current);
SyntaxTreeMouseImpl parent = new SyntaxTreeMou... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getSyntaxTreeWithCompress" | "public SyntaxTreeMouseImpl getSyntaxTreeWithCompress() {
cleanUpInvalidBranch(current);
fixMemoizedBranch(current);
sortBranch(current);
cleanUpFailedBranch(current);
cleanUpEmptyBranch(current);
compressBranch(current);
<MASK>Debug.dump(current);</MASK>
SyntaxTreeMouseImpl parent = new ... |
Inversion-Mutation | megadiff | "public void apply(GOut g) {
long st = 0;
if(Config.profile) st = System.nanoTime();
if(trans.length < slotnum) {
synchronized(Slot.class) {
trans = new boolean[slotnum];
repl = new boolean[slotnum];
shaders = Utils.extend(shaders, slotnum);
}
}
bufdiff(cur, nex... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "apply" | "public void apply(GOut g) {
long st = 0;
if(Config.profile) st = System.nanoTime();
<MASK>Slot<?>[] deplist = GLState.deplist;</MASK>
if(trans.length < slotnum) {
synchronized(Slot.class) {
trans = new boolean[slotnum];
repl = new boolean[slotnum];
shaders = Utils.extend... |
Inversion-Mutation | megadiff | "private void writeObject(ObjectOutputStream stream)
throws IOException {
stream.writeObject(back);
stream.writeObject(front);
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "writeObject" | "private void writeObject(ObjectOutputStream stream)
throws IOException {
<MASK>stream.writeObject(front);</MASK>
stream.writeObject(back);
}" |
Inversion-Mutation | megadiff | "private Injector createWebInjector() {
final List<Module> modules = new ArrayList<Module>();
modules.add(sshInjector.getInstance(WebModule.class));
modules.add(sshInjector.getInstance(ProjectQoSFilter.Module.class));
return sysInjector.createChildInjector(modules);
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createWebInjector" | "private Injector createWebInjector() {
final List<Module> modules = new ArrayList<Module>();
<MASK>modules.add(sshInjector.getInstance(ProjectQoSFilter.Module.class));</MASK>
modules.add(sshInjector.getInstance(WebModule.class));
return sysInjector.createChildInjector(modules);
}" |
Inversion-Mutation | megadiff | "@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.my_tag_activity);
if (savedInstanceState != null) {
mTagIdInEdit = savedInstanceState.getLong(BUNDLE_KEY_TAG_ID_IN_EDIT, -1);
}
//... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onCreate" | "@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.my_tag_activity);
if (savedInstanceState != null) {
mTagIdInEdit = savedInstanceState.getLong(BUNDLE_KEY_TAG_ID_IN_EDIT, -1);
}
//... |
Inversion-Mutation | megadiff | "public void 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 | "@SuppressWarnings("serial")
public MyRosPage(final PageParameters parameters)
throws URISyntaxException, ROSRSException {
super(parameters);
List<URI> uris = ROSRService.getROList(rodlURI, MySession.get().getdLibraAccessToken());
final List<ResearchObject> researchObjects... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "MyRosPage" | "@SuppressWarnings("serial")
public MyRosPage(final PageParameters parameters)
throws URISyntaxException, ROSRSException {
super(parameters);
List<URI> uris = ROSRService.getROList(rodlURI, MySession.get().getdLibraAccessToken());
final List<ResearchObject> researchObjects... |
Inversion-Mutation | megadiff | "@Override
protected void onSubmit(AjaxRequestTarget target, Form<?> addForm) {
super.onSubmit(target, addForm);
Token dLibraToken = MySession.get().getdLibraAccessToken();
try {
ClientResponse response = ROSRService.createResearchObje... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onSubmit" | "@Override
protected void onSubmit(AjaxRequestTarget target, Form<?> addForm) {
super.onSubmit(target, addForm);
Token dLibraToken = MySession.get().getdLibraAccessToken();
try {
ClientResponse response = ROSRService.createResearchObje... |
Inversion-Mutation | megadiff | "public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
Player send;
if(!(sender instanceof Player)){
sender.sendMessage(title + ChatColor.RED + "Player context is required!");
return true;
}
send = (Player) sender;
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onCommand" | "public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
Player send;
if(!(sender instanceof Player)){
sender.sendMessage(title + ChatColor.RED + "Player context is required!");
return true;
}
send = (Player) sender;
... |
Inversion-Mutation | megadiff | "public Set<Outage> updateOutages(final Set<ProtoOutage> outages) {
final Set<Outage> ret = new HashSet<Outage>();
for (ProtoOutage protoOutage : outages) {
final Outage existingOutage = getActiveOutage(
protoOutage.outage.getLat(), protoOutage.outage.getLon());
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "updateOutages" | "public Set<Outage> updateOutages(final Set<ProtoOutage> outages) {
final Set<Outage> ret = new HashSet<Outage>();
for (ProtoOutage protoOutage : outages) {
final Outage existingOutage = getActiveOutage(
protoOutage.outage.getLat(), protoOutage.outage.getLon());
... |
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 | "@Override
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
RSSReaderServiceLocator serviceLocator = (RSSReaderServiceLocator) getApplication();
Preferences preferences = serviceLocator.getPreferences();
rssPollServiceScheduler = serviceLocator.getRssPollServiceScheduler();
getPref... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onCreate" | "@Override
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
RSSReaderServiceLocator serviceLocator = (RSSReaderServiceLocator) getApplication();
Preferences preferences = serviceLocator.getPreferences();
rssPollServiceScheduler = serviceLocator.getRssPollServiceScheduler();
<MASK>ad... |
Inversion-Mutation | megadiff | "public IPCDISession createDebuggerSession(IPLaunch launch, IBinaryObject exe, IProgressMonitor monitor) throws CoreException {
IPJob job = launch.getPJob();
/*
* Find number of processes in job. If the attribute does not exist, assume one process.
*/
IntegerAttribute numProcAttr = job.getAttribute(Job... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createDebuggerSession" | "public IPCDISession createDebuggerSession(IPLaunch launch, IBinaryObject exe, IProgressMonitor monitor) throws CoreException {
IPJob job = launch.getPJob();
/*
* Find number of processes in job. If the attribute does not exist, assume one process.
*/
IntegerAttribute numProcAttr = job.getAttribute(Job... |
Inversion-Mutation | megadiff | "private void findUiChildren(JClassType ownerType)
throws UnableToCompleteException {
while (ownerType != null) {
JMethod[] methods = ownerType.getMethods();
for (JMethod method : methods) {
UiChild annotation = method.getAnnotation(UiChild.class);
if (annotation != null) {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "findUiChildren" | "private void findUiChildren(JClassType ownerType)
throws UnableToCompleteException {
<MASK>JMethod[] methods = ownerType.getMethods();</MASK>
while (ownerType != null) {
for (JMethod method : methods) {
UiChild annotation = method.getAnnotation(UiChild.class);
if (annotation ... |
Inversion-Mutation | megadiff | "@Override
public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain)
throws IOException, ServletException {
final HttpServletRequest httpServletRequest = (HttpServletRequest) request;
final String requestURI = httpServletRequest.getReques... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doFilter" | "@Override
public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain)
throws IOException, ServletException {
final HttpServletRequest httpServletRequest = (HttpServletRequest) request;
final String requestURI = httpServletRequest.getReques... |
Inversion-Mutation | megadiff | "public void addGZIPPostParam(String key, String value) {
try {
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
ArrayList<NameValuePair> postParams = new ArrayList<NameValuePair>();
postParams.add((new BasicNameValuePair(key, value)));
GZIPOutputStream gZIPOutputStream = ne... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "addGZIPPostParam" | "public void addGZIPPostParam(String key, String value) {
try {
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
ArrayList<NameValuePair> postParams = new ArrayList<NameValuePair>();
postParams.add((new BasicNameValuePair(key, value)));
GZIPOutputStream gZIPOutputStream = ne... |
Inversion-Mutation | megadiff | "public void actionPerformed(final ActionEvent e)
{
final CreateNewRepositoryFolderDialog newFolderDialog =
new CreateNewRepositoryFolderDialog(RepositoryPublishDialog.this);
if (!newFolderDialog.performEdit())
{
return;
}
final FileObject treeNode = g... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "actionPerformed" | "public void actionPerformed(final ActionEvent e)
{
final CreateNewRepositoryFolderDialog newFolderDialog =
new CreateNewRepositoryFolderDialog(RepositoryPublishDialog.this);
if (!newFolderDialog.performEdit())
{
return;
}
final FileObject treeNode = g... |
Inversion-Mutation | megadiff | "public GoalBuilder(Player player, List<String> commands, QuestChapter chapter) {
ScriptBuilder scriptBuilder = DenizenAPI.getCurrentInstance().getScriptEngine().getScriptBuilder();
CommandExecuter executor = DenizenAPI.getCurrentInstance().getScriptEngine().getScriptExecuter();
String[] args = null;
QuestM... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "GoalBuilder" | "public GoalBuilder(Player player, List<String> commands, QuestChapter chapter) {
ScriptBuilder scriptBuilder = DenizenAPI.getCurrentInstance().getScriptEngine().getScriptBuilder();
CommandExecuter executor = DenizenAPI.getCurrentInstance().getScriptEngine().getScriptExecuter();
String[] args = null;
QuestM... |
Inversion-Mutation | megadiff | "@Override
public void startSession() {
lights = new LightTracer(map);
lights.setUncaughtExceptionHandler(LightTracerCrashHandler
.getInstance());
lights.start();
partSystem = new ParticleSystem();
mapDisplay = new MapDisplayManager();
musicBox... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "startSession" | "@Override
public void startSession() {
lights = new LightTracer(map);
lights.setUncaughtExceptionHandler(LightTracerCrashHandler
.getInstance());
lights.start();
partSystem = new ParticleSystem();
mapDisplay = new MapDisplayManager();
musicBox... |
Inversion-Mutation | megadiff | "public Triangle getClosestTriangle(double[] coords, double[] projection, int group)
{
Node n = getNode(coords, workBoundary1);
assert n != null;
Triangle toReturn = null;
double aabbDistance = Double.POSITIVE_INFINITY;
double triangleDistance;
seen.clear();
if(n.triangles == null || n.triangles.... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getClosestTriangle" | "public Triangle getClosestTriangle(double[] coords, double[] projection, int group)
{
Node n = getNode(coords, workBoundary1);
assert n != null;
Triangle toReturn = null;
double aabbDistance = Double.POSITIVE_INFINITY;
double triangleDistance;
seen.clear();
if(n.triangles == null || n.triangles.... |
Inversion-Mutation | megadiff | "private void registerUIExtensions() {
// remember: the first handler to be added will be the first one open when stuff changes
uiExtensions.add((UIExtension)new Configuration(this));
uiExtensions.add((UIExtension)new SequenceEdit(this));
uiExtensions.add((UIExtension)new QuerySequence(this));
uiExtensio... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "registerUIExtensions" | "private void registerUIExtensions() {
// remember: the first handler to be added will be the first one open when stuff changes
uiExtensions.add((UIExtension)new Configuration(this));
uiExtensions.add((UIExtension)new SequenceEdit(this));
uiExtensions.add((UIExtension)new QuerySequence(this));
uiExtensi... |
Inversion-Mutation | megadiff | "public void receive(NodeEvent event) {
if (event.getSource() != parameter.getNode()) return;
if (event instanceof ValueChangedEvent) {
// Check if the value change triggered a change in expression status.
// This can happen if revert to default switches from value to express... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "receive" | "public void receive(NodeEvent event) {
if (event.getSource() != parameter.getNode()) return;
if (event instanceof ValueChangedEvent) {
// Check if the value change triggered a change in expression status.
// This can happen if revert to default switches from value to express... |
Inversion-Mutation | megadiff | "@Override
public boolean onCreateOptionsMenu(Menu menu) {
menu.add(0, MENU_FILTER, 0, res.getString(R.string.caches_filter)).setIcon(R.drawable.ic_menu_filter);
if (type != CacheListType.HISTORY) {
menu.add(0, MENU_SORT, 0, res.getString(R.string.caches_sort)).setIcon(R.drawable.i... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onCreateOptionsMenu" | "@Override
public boolean onCreateOptionsMenu(Menu menu) {
menu.add(0, MENU_FILTER, 0, res.getString(R.string.caches_filter)).setIcon(R.drawable.ic_menu_filter);
if (type != CacheListType.HISTORY) {
menu.add(0, MENU_SORT, 0, res.getString(R.string.caches_sort)).setIcon(R.drawable.i... |
Inversion-Mutation | megadiff | "@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
getSherlockActivity().getSupportActionBar().setHomeButtonEnabled(true);
inflater.inflate(R.menu.catalog_menu, menu);
this.searchMenuItem = menu.findItem(R.id.search);
if (searchMenuItem != null) {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onCreateOptionsMenu" | "@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
getSherlockActivity().getSupportActionBar().setHomeButtonEnabled(true);
inflater.inflate(R.menu.catalog_menu, menu);
this.searchMenuItem = menu.findItem(R.id.search);
if (searchMenuItem != null) {
... |
Inversion-Mutation | megadiff | "public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) throws IOException, ServletException {
HttpServletRequest httpReq = (HttpServletRequest) request;
if(log.isDebugEnabled()){
log.debug("Enter SessionManagerFilter form " + httpReq.getRequestURI());
}
if (requ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doFilter" | "public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) throws IOException, ServletException {
HttpServletRequest httpReq = (HttpServletRequest) request;
if(log.isDebugEnabled()){
log.debug("Enter SessionManagerFilter form " + httpReq.getRequestURI());
}
if (requ... |
Inversion-Mutation | megadiff | "private void runFinalizer() {
frameworkVersion = JOptionPane.showInputDialog("Merci de preciser le numéro de version du framework");
if (frameworkVersion == null || frameworkVersion.trim().isEmpty()) {
JOptionPane.showMessageDialog(getMainPanel(),
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "runFinalizer" | "private void runFinalizer() {
frameworkVersion = JOptionPane.showInputDialog("Merci de preciser le numéro de version du framework");
if (frameworkVersion == null || frameworkVersion.trim().isEmpty()) {
JOptionPane.showMessageDialog(getMainPanel(),
... |
Inversion-Mutation | megadiff | "@Override
public void onEnable() {
initEvents();
initPermissions();
getConfig().options().copyDefaults();
log.info("Enabled.");
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onEnable" | "@Override
public void onEnable() {
initEvents();
initPermissions();
<MASK>log.info("Enabled.");</MASK>
getConfig().options().copyDefaults();
}" |
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 | "@Override
public boolean commit() {
// Commit any in-process edits
if (getMacroTable().isEditing()) {
getMacroTable().getCellEditor().stopCellEditing();
}
if (getSpeechTable().isEditing()) {
getSpeechTable().getCellEditor().stopCellEditing();
}
if (getPropertyTable().isEditing()) ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "commit" | "@Override
public boolean commit() {
// Commit any in-process edits
if (getMacroTable().isEditing()) {
getMacroTable().getCellEditor().stopCellEditing();
}
if (getSpeechTable().isEditing()) {
getSpeechTable().getCellEditor().stopCellEditing();
}
if (getPropertyTable().isEditing()) ... |
Inversion-Mutation | megadiff | "public static void battle(int choice) {
//Declare variables for the moves of the player and monster
boolean monsterHeal = false;
boolean monsterDefend = false;
boolean monsterAttack = false;
boolean playerDefend = false;
boolean playerAttack = false;
boolean playerHeal = false;
//Get th... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "battle" | "public static void battle(int choice) {
//Declare variables for the moves of the player and monster
boolean monsterHeal = false;
boolean monsterDefend = false;
boolean monsterAttack = false;
boolean playerDefend = false;
boolean playerAttack = false;
boolean playerHeal = false;
//Get th... |
Inversion-Mutation | megadiff | "@Override
public void load() {
MinecraftForge.versionDetect("IronChest", 1, 3, 0);
proxy = ServerClientProxy.getProxy();
File cfgFile = new File(proxy.getMinecraftDir(), "config/IronChest.cfg");
Configuration cfg = new Configuration(cfgFile);
try {
cfg.load();
ironChestBlock = new BlockIronChe... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "load" | "@Override
public void load() {
MinecraftForge.versionDetect("IronChest", 1, 3, 0);
proxy = ServerClientProxy.getProxy();
File cfgFile = new File(proxy.getMinecraftDir(), "config/IronChest.cfg");
Configuration cfg = new Configuration(cfgFile);
try {
cfg.load();
ironChestBlock = new BlockIronChe... |
Inversion-Mutation | megadiff | "@Override
public void onClick(View v) {
// TODO Auto-generated method stub
database db = new database(tallyclass.this);
if(!(db.getvalue(v.getTag().toString()).equals("0")))
{
db.subtract(v.getTag().toString());
count_reg-=1;
reading.setText(count_reg+"");
}
else
Toast.make... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onClick" | "@Override
public void onClick(View v) {
// TODO Auto-generated method stub
database db = new database(tallyclass.this);
if(!(db.getvalue(v.getTag().toString()).equals("0")))
{
db.subtract(v.getTag().toString());
<MASK>db.close();</MASK>
count_reg-=1;
reading.setText(count_reg+"");
... |
Inversion-Mutation | megadiff | "public Object createPersistentCollection(Map<String, Serializable> proxyInformations,
Object underlyingCollection)
{
// Get current opened session
//
Session session = _session.get();
if (session == null)
{
throw new NullPointerException("Cannot load : no session opened !");
}
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createPersistentCollection" | "public Object createPersistentCollection(Map<String, Serializable> proxyInformations,
Object underlyingCollection)
{
// Get current opened session
//
Session session = _session.get();
if (session == null)
{
throw new NullPointerException("Cannot load : no session opened !");
}
... |
Inversion-Mutation | megadiff | "public static void removeDuplicateLink(SingleLink head){
if(head == null || head.next == null)
return;
SingleLink node = head;
HashMap<String,Integer> map = new HashMap<String, Integer>();
while (node != null && node.next != null){
SingleLink nextNode = n... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "removeDuplicateLink" | "public static void removeDuplicateLink(SingleLink head){
if(head == null || head.next == null)
return;
SingleLink node = head;
HashMap<String,Integer> map = new HashMap<String, Integer>();
while (node != null && node.next != null){
SingleLink nextNode = n... |
Inversion-Mutation | megadiff | "public void setDataSource(Context context, Uri uri)
throws IllegalArgumentException, SecurityException {
if (uri == null) {
throw new IllegalArgumentException();
}
String scheme = uri.getScheme();
if(scheme == null || scheme.equals("file")) {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setDataSource" | "public void setDataSource(Context context, Uri uri)
throws IllegalArgumentException, SecurityException {
if (uri == null) {
throw new IllegalArgumentException();
}
String scheme = uri.getScheme();
if(scheme == null || scheme.equals("file")) {
... |
Inversion-Mutation | megadiff | "protected String serializedArgs() {
final StringBuilder result = new StringBuilder();
result.append(JLSConstants.OPEN_BRACKET);
for (int i = 0; i < args.size(); i++) {
if (i != 0) {
result.append(JLSConstants.ARGS_SEPARATOR);
}
result.append(args.get(i).getJLSCode());
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "serializedArgs" | "protected String serializedArgs() {
final StringBuilder result = new StringBuilder();
result.append(JLSConstants.OPEN_BRACKET);
for (int i = 0; i < args.size(); i++) {
<MASK>result.append(args.get(i).getJLSCode());</MASK>
if (i != 0) {
result.append(JLSConstants.ARGS_SEPARATOR);
... |
Inversion-Mutation | megadiff | "public void stopCapture(){
if(mVideoPublish != null){
pauseCapture();
// Because the CameraDevice object is not a shared resource, it's very
// important to release it when it may not be used anymore
if(mVideoPublish.mCamera != null){
mVideoPublish.mCamera.release(... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "stopCapture" | "public void stopCapture(){
if(mVideoPublish != null){
pauseCapture();
// Because the CameraDevice object is not a shared resource, it's very
// important to release it when it may not be used anymore
if(mVideoPublish.mCamera != null){
mVideoPublish.mCamera.release(... |
Inversion-Mutation | megadiff | "public void createControl(final Composite parent) {
Composite comp = new Composite(parent, SWT.NONE);
pageControl = comp;
GridLayout layout = new GridLayout();
layout.numColumns = 3;
comp.setLayout(layout);
GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
comp.setLayoutData(gd);
//... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createControl" | "public void createControl(final Composite parent) {
Composite comp = new Composite(parent, SWT.NONE);
pageControl = comp;
GridLayout layout = new GridLayout();
layout.numColumns = 3;
comp.setLayout(layout);
GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
comp.setLayoutData(gd);
//... |
Inversion-Mutation | megadiff | "private String createUpdateMessage(Commit _commit) {
StringBuilder buf = new StringBuilder();
buf.append("Code changed in "+_commit.project+"\n");
buf.append(MessageFormat.format("User: {0}\n",_commit.userName));
buf.append("Path:\n");
if (_commit instanceof CVSCommit) {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createUpdateMessage" | "private String createUpdateMessage(Commit _commit) {
StringBuilder buf = new StringBuilder();
buf.append("Code changed in "+_commit.project+"\n");
buf.append(MessageFormat.format("User: {0}\n",_commit.userName));
buf.append("Path:\n");
if (_commit instanceof CVSCommit) {
... |
Inversion-Mutation | megadiff | "@Override
public void onReceive(final Context context, Intent intent) {
final String action = intent.getAction();
if (Log.LOGV) Log.v("AlarmInitReceiver" + action);
final PendingResult result = goAsync();
final WakeLock wl = AlarmAlertWakeLock.createPartialWakeLock(context);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onReceive" | "@Override
public void onReceive(final Context context, Intent intent) {
final String action = intent.getAction();
if (Log.LOGV) Log.v("AlarmInitReceiver" + action);
final PendingResult result = goAsync();
final WakeLock wl = AlarmAlertWakeLock.createPartialWakeLock(context);
... |
Inversion-Mutation | megadiff | "@Override public void run() {
// Remove the snooze alarm after a boot.
if (action.equals(Intent.ACTION_BOOT_COMPLETED)) {
Alarms.saveSnoozeAlert(context, Alarms.INVALID_ALARM_ID, -1);
Alarms.disableExpiredAlarms(context);
}
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "@Override public void run() {
// Remove the snooze alarm after a boot.
if (action.equals(Intent.ACTION_BOOT_COMPLETED)) {
Alarms.saveSnoozeAlert(context, Alarms.INVALID_ALARM_ID, -1);
}
<MASK>Alarms.disableExpiredAlarms(context... |
Inversion-Mutation | megadiff | "void start () {
try {
graphics.setupDisplay();
listener.create();
listener.resize(Math.max(1, graphics.getWidth()), Math.max(1, graphics.getHeight()));
} catch (Exception ex) {
stopped();
throw new GdxRuntimeException(ex);
}
EventQueue.invokeLater(new Runnable() {
int lastWidth ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "start" | "void start () {
try {
graphics.setupDisplay();
listener.create();
listener.resize(Math.max(1, graphics.getWidth()), Math.max(1, graphics.getHeight()));
} catch (Exception ex) {
stopped();
throw new GdxRuntimeException(ex);
}
EventQueue.invokeLater(new Runnable() {
int lastWidth ... |
Inversion-Mutation | megadiff | "public void run () {
if (!running) return;
graphics.updateTime();
synchronized (runnables) {
executedRunnables.clear();
executedRunnables.addAll(runnables);
runnables.clear();
for (int i = 0; i < executedRunnables.size(); i++) {
try {
executedRunnables.get(i).ru... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "public void run () {
if (!running) return;
<MASK>canvas.setCursor(cursor);</MASK>
graphics.updateTime();
synchronized (runnables) {
executedRunnables.clear();
executedRunnables.addAll(runnables);
runnables.clear();
for (int i = 0; i < executedRunnables.size(); i++) {
... |
Inversion-Mutation | megadiff | "@EventHandler
public void interact(PlayerInteractEvent event) {
if (!event.getPlayer().getWorld().getName().equals(name)) return;
try {
Player player = event.getPlayer();
if (selecting.contains(player.getName())) {
player.sendMessage(ChatColor.RED + "Yo... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "interact" | "@EventHandler
public void interact(PlayerInteractEvent event) {
if (!event.getPlayer().getWorld().getName().equals(name)) return;
try {
Player player = event.getPlayer();
if (selecting.contains(player.getName())) {
player.sendMessage(ChatColor.RED + "Yo... |
Inversion-Mutation | megadiff | "@RequestMapping(value="/projects/{projectId}/analyses/{analysisId}", method=RequestMethod.GET, produces="application/json")
@PreAuthorize("permitAll")
public void handleJSON(
Authentication authentication,
HttpServletRequest request,
HttpServletResponse response,
@ModelAtt... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "handleJSON" | "@RequestMapping(value="/projects/{projectId}/analyses/{analysisId}", method=RequestMethod.GET, produces="application/json")
@PreAuthorize("permitAll")
public void handleJSON(
Authentication authentication,
HttpServletRequest request,
HttpServletResponse response,
@ModelAtt... |
Inversion-Mutation | megadiff | "@Override
public void update() {
super.update(); // makes sure to execute AppTasks
if (speed == 0 || paused) {
return;
}
float tpf = timer.getTimePerFrame() * speed;
if (showFps) {
secondCounter += timer.getTimePerFrame();
fra... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "update" | "@Override
public void update() {
super.update(); // makes sure to execute AppTasks
if (speed == 0 || paused) {
return;
}
float tpf = timer.getTimePerFrame() * speed;
if (showFps) {
secondCounter += timer.getTimePerFrame();
fra... |
Inversion-Mutation | megadiff | "@Override
public void draw(Graphics g)
{
Graphics2D g2d = (Graphics2D)g;
AffineTransform transform = new AffineTransform();
BufferedImage img = new BufferedImage(10, 10, BufferedImage.TYPE_INT_ARGB);
Vector right = new Vector(1,0);
// Draw head
try
{
img = ImageIO.read( new File("images/... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "draw" | "@Override
public void draw(Graphics g)
{
Graphics2D g2d = (Graphics2D)g;
AffineTransform <MASK>transform = new AffineTransform();</MASK>
BufferedImage img = new BufferedImage(10, 10, BufferedImage.TYPE_INT_ARGB);
Vector right = new Vector(1,0);
// Draw head
try
{
img = ImageIO.read( new ... |
Inversion-Mutation | megadiff | "private Token<JavaFXTokenId> processString(int quote, int startedWith) {
assert (quote == '\'' || quote == '"');
assert( startedWith == RBRACE || startedWith == 0);
while (true) {
int c = inputRead();
switch (c) {
case '\'': // NOI18N
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "processString" | "private Token<JavaFXTokenId> processString(int quote, int startedWith) {
assert (quote == '\'' || quote == '"');
assert( startedWith == RBRACE || startedWith == 0);
while (true) {
int c = inputRead();
switch (c) {
case '\'': // NOI18N
... |
Inversion-Mutation | megadiff | "RobotType(RobotLevel level,
double maxEnergon,
double maxFlux,
double spawnCost,
double upkeep,
int moveDelayOrthogonal,
double moveCost,
int sensorRadiusSquared,
double sensorAngle,
int attackRadiusMinSquared,
int attackRadiusMaxSquared,
double attackAngle,
int attackDelay,
dou... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "RobotType" | "RobotType(RobotLevel level,
double maxEnergon,
double maxFlux,
double spawnCost,
double upkeep,
int moveDelayOrthogonal,
double moveCost,
int sensorRadiusSquared,
double sensorAngle,
<MASK>int attackRadiusMaxSquared,</MASK>
int attackRadiusMinSquared,
double attackAngle,
int attack... |
Inversion-Mutation | megadiff | "private void initPlayerListeners() {
final Timer timer = new Timer(1000, new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (progressEnabled && player.isPlaying() && !isSeeking) {
progressSlider.setValue((int) player.getCurrentSample());
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "initPlayerListeners" | "private void initPlayerListeners() {
final Timer timer = new Timer(1000, new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (progressEnabled && player.isPlaying() && !isSeeking) {
progressSlider.setValue((int) player.getCurrentSample());
... |
Inversion-Mutation | megadiff | "public void onEvent(PlayerEvent e) {
pauseButton.setSelected(player.isPaused());
switch (e.getEventCode()) {
case PLAYING_STARTED:
timer.start();
break;
case PAUSED:
t... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onEvent" | "public void onEvent(PlayerEvent e) {
pauseButton.setSelected(player.isPaused());
switch (e.getEventCode()) {
case PLAYING_STARTED:
timer.start();
<MASK>updateStatus();</MASK>
break;
... |
Inversion-Mutation | megadiff | "public static boolean makeConnections(EOObjectStore os, String tag) {
Logger logger = Logger.getLogger("rujel.dbConnection");
SettingsReader dbSettings = SettingsReader.settingsForPath("dbConnection", false);
if(dbSettings == null) {
logger.log(WOLogLevel.CONFIG,
"No database connection settings fou... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "makeConnections" | "public static boolean makeConnections(EOObjectStore os, String tag) {
Logger logger = Logger.getLogger("rujel.dbConnection");
SettingsReader dbSettings = SettingsReader.settingsForPath("dbConnection", false);
if(dbSettings == null) {
logger.log(WOLogLevel.CONFIG,
"No database connection settings fou... |
Inversion-Mutation | megadiff | "public Response callAndWait( String recipientId, Map msg, int timeout )
throws SampException {
long finish = timeout > 0
? System.currentTimeMillis() + timeout * 1000
: Long.MAX_VALUE; // 3e8 years
HubConnection connection = getConnection();
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "callAndWait" | "public Response callAndWait( String recipientId, Map msg, int timeout )
throws SampException {
long finish = timeout > 0
? System.currentTimeMillis() + timeout * 1000
: Long.MAX_VALUE; // 3e8 years
HubConnection connection = getConnection();
... |
Inversion-Mutation | megadiff | "public void link(final Canvas newCanvas) {
if (canvas == newCanvas) return;
final Canvas oldCanvas = canvas;
canvas = newCanvas;
Display.getDefault().asyncExec(new Runnable(){
@Override
public void run() {
linkInternal(newCanvas);
unlinkInternal(oldCanvas);
canvas.redraw();
}
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "link" | "public void link(final Canvas newCanvas) {
if (canvas == newCanvas) return;
final Canvas oldCanvas = canvas;
Display.getDefault().asyncExec(new Runnable(){
@Override
public void run() {
linkInternal(newCanvas);
unlinkInternal(oldCanvas);
<MASK>canvas = newCanvas;</MASK>
canvas.re... |
Inversion-Mutation | megadiff | "public UpstreamBridge(ProxyServer bungee, UserConnection con)
{
this.bungee = bungee;
this.con = con;
BungeeCord.getInstance().addConnection( con );
bungee.getTabListHandler().onConnect( con );
con.unsafe().sendPacket( BungeeCord.getInstance().registerChannels() );
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "UpstreamBridge" | "public UpstreamBridge(ProxyServer bungee, UserConnection con)
{
this.bungee = bungee;
this.con = con;
<MASK>bungee.getTabListHandler().onConnect( con );</MASK>
BungeeCord.getInstance().addConnection( con );
con.unsafe().sendPacket( BungeeCord.getInstance().registerC... |
Inversion-Mutation | megadiff | "private void cameraZoomOut(State toState, boolean animated) {
final Resources res = getResources();
final boolean toAllApps = (toState == State.ALL_APPS);
final int duration = toAllApps ?
res.getInteger(R.integer.config_allAppsZoomInTime) :
res.getInteger(... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "cameraZoomOut" | "private void cameraZoomOut(State toState, boolean animated) {
final Resources res = getResources();
final boolean toAllApps = (toState == State.ALL_APPS);
final int duration = toAllApps ?
res.getInteger(R.integer.config_allAppsZoomInTime) :
res.getInteger(... |
Inversion-Mutation | megadiff | "public void printTree(){
System.out.println(name + ":" + subTreeString() + "\n");
for(Block b : successors)
{
if(!b.visited){
b.visited = true;
b.printTree();
}
}
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "printTree" | "public void printTree(){
System.out.println(name + ":" + subTreeString() + "\n");
for(Block b : successors)
{
if(!b.visited){
b.printTree();
}
<MASK>b.visited = true;</MASK>
}
}" |
Inversion-Mutation | megadiff | "@SuppressWarnings("deprecation")
@Override
public void onCreate(Bundle savedInstanceState) {
UIHelper.SetTheme(this, null);
super.onCreate(savedInstanceState);
UIHelper.SetActionBarDisplayHomeAsUp(this, true);
activity = this;
//This man is deprecated but but we may wa... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onCreate" | "@SuppressWarnings("deprecation")
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
<MASK>UIHelper.SetTheme(this, null);</MASK>
UIHelper.SetActionBarDisplayHomeAsUp(this, true);
activity = this;
//This man is deprecated b... |
Inversion-Mutation | megadiff | "private boolean checkPing() {
if (mPingCollector != null) {
IQ result = (IQ) mPingCollector.pollResult();
mPingCollector.cancel();
mPingCollector = null;
if (result == null || result.getError() != null) {
Log.e(TAG, "ping timeout");
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "checkPing" | "private boolean checkPing() {
if (mPingCollector != null) {
IQ result = (IQ) mPingCollector.pollResult();
mPingCollector.cancel();
if (result == null || result.getError() != null) {
<MASK>mPingCollector = null;</MASK>
Log.e(TAG, "ping t... |
Inversion-Mutation | megadiff | "@Override
public void onCreate(Bundle icicle) {
this.mTestPath = (String) icicle.get("path");
String timeout_str = (String) icicle.get("timeout");
if (timeout_str != null) {
try {
this.mTimeoutInMillis = Integer.parseInt(timeout_str);
} catch ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onCreate" | "@Override
public void onCreate(Bundle icicle) {
<MASK>super.onCreate(icicle);</MASK>
this.mTestPath = (String) icicle.get("path");
String timeout_str = (String) icicle.get("timeout");
if (timeout_str != null) {
try {
this.mTimeoutInMillis = Integer... |
Inversion-Mutation | megadiff | "protected AttributedList<Path> listObjects(String bucket, String prefix, String delimiter)
throws IOException, ServiceException {
final AttributedList<Path> children = new AttributedList<Path>();
// Null if listing is complete
String priorLastKey = null;
do {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "listObjects" | "protected AttributedList<Path> listObjects(String bucket, String prefix, String delimiter)
throws IOException, ServiceException {
final AttributedList<Path> children = new AttributedList<Path>();
// Null if listing is complete
String priorLastKey = null;
do {
... |
Inversion-Mutation | megadiff | "@Override public void writeTo(final DataOutput out) throws IOException {
super.writeTo(out);
out.writeInt(numDocs);
out.writeInt(maxDoc);
out.writeInt(numDeletedDocs);
out.writeInt(fieldsTermsFreqs.size());
for (Map.Entry<String, TObjectIntHashMap<String>> entry : ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "writeTo" | "@Override public void writeTo(final DataOutput out) throws IOException {
super.writeTo(out);
out.writeInt(numDocs);
out.writeInt(maxDoc);
out.writeInt(numDeletedDocs);
out.writeInt(fieldsTermsFreqs.size());
for (Map.Entry<String, TObjectIntHashMap<String>> entry : ... |
Inversion-Mutation | megadiff | "private boolean expr2()
{
CLexer.TokenTypeEnum currToken;
double dblValue;
currToken = CLexer.TokenTypeEnum.T_EOL;
currToken = m_Lexer.m_currToken.Type;
if ( m_Lexer.m_currToken.Type == CLexer.TokenTypeEnum.T_UMINUS )
{
m_Lexer.GetNextToken();
}
if ( !expr3() )
return false;
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "expr2" | "private boolean expr2()
{
CLexer.TokenTypeEnum currToken;
double dblValue;
currToken = CLexer.TokenTypeEnum.T_EOL;
if ( m_Lexer.m_currToken.Type == CLexer.TokenTypeEnum.T_UMINUS )
{
<MASK>currToken = m_Lexer.m_currToken.Type;</MASK>
m_Lexer.GetNextToken();
}
if ( !expr3() )
retu... |
Inversion-Mutation | megadiff | "private static void testStatementRemembersTimeout(Statement stmt)
throws SQLException, TestFailedException
{
System.out.println("Testing that Statement remembers timeout.");
stmt.setQueryTimeout(1);
long runTime=0;
for (int i = 0; i < 3; i++) {
try {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "testStatementRemembersTimeout" | "private static void testStatementRemembersTimeout(Statement stmt)
throws SQLException, TestFailedException
{
System.out.println("Testing that Statement remembers timeout.");
stmt.setQueryTimeout(1);
long runTime=0;
for (int i = 0; i < 3; i++) {
try {
... |
Inversion-Mutation | megadiff | "private void byeHandler(ByeMessage message) {
Host host = this.getOrCreateHost(message.getSource().getAddress());
if (host.getPort() != Host.UNKNOWN_PORT) {
RemoteShare tmp;
if (this.guiCallbacks != null) {
this.guiCallbacks.hostWentOffline(host);
}
for (String hash : host.getSharedFiles().k... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "byeHandler" | "private void byeHandler(ByeMessage message) {
Host host = this.getOrCreateHost(message.getSource().getAddress());
if (host.getPort() != Host.UNKNOWN_PORT) {
RemoteShare tmp;
if (this.guiCallbacks != null) {
this.guiCallbacks.hostWentOffline(host);
}
for (String hash : host.getSharedFiles().k... |
Inversion-Mutation | megadiff | "private void updateDetails() {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
details.clear();
if (error == null) {
id.setText("");
date.setText("");
level.setText("");
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "updateDetails" | "private void updateDetails() {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
if (error == null) {
id.setText("");
date.setText("");
level.setText("");
status.setText("");
... |
Inversion-Mutation | megadiff | "public void run() {
details.clear();
if (error == null) {
id.setText("");
date.setText("");
level.setText("");
status.setText("");
return;
}... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "public void run() {
if (error == null) {
id.setText("");
date.setText("");
level.setText("");
status.setText("");
<MASK>details.clear();</MASK>
return;
... |
Inversion-Mutation | megadiff | "public double convert() throws IllegalStateException, IOException, JSONException {
if (isOnline()) {
// Checking if we have a copy of the exchange rates yet, or if they
// are old
if (exRatesMap == null || exRatesMap.isEmpty()
|| ((int) (System.currentTimeMillis() / 1000L) - prefs.getLong("time... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "convert" | "public double convert() throws IllegalStateException, IOException, JSONException {
<MASK>cDB.open();</MASK>
if (isOnline()) {
// Checking if we have a copy of the exchange rates yet, or if they
// are old
if (exRatesMap == null || exRatesMap.isEmpty()
|| ((int) (System.currentTimeMillis() / 1... |
Inversion-Mutation | megadiff | "private DownloadImagesTaskResult processImages() throws DownloadTaskException {
List<TestbedMapImage> testbedMapImages = MainApplication.getTestbedParsedPage().getAllTestbedImages();
int totalImagesNotDownloaded = MainApplication.getTestbedParsedPage().getNotDownloadedCount();
int i= 1;
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "processImages" | "private DownloadImagesTaskResult processImages() throws DownloadTaskException {
List<TestbedMapImage> testbedMapImages = MainApplication.getTestbedParsedPage().getAllTestbedImages();
int totalImagesNotDownloaded = MainApplication.getTestbedParsedPage().getNotDownloadedCount();
int i= 1;
... |
Inversion-Mutation | megadiff | "@Override
protected void onCreate( Bundle savedInstanceState )
{
super.onCreate( savedInstanceState );
setContentView( R.layout.section_read_view );
setupPresenter();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onCreate" | "@Override
protected void onCreate( Bundle savedInstanceState )
{
super.onCreate( savedInstanceState );
<MASK>setupPresenter();</MASK>
setContentView( R.layout.section_read_view );
}" |
Inversion-Mutation | megadiff | "public void updateContact(TransportBuddy contact) {
RosterEntry user2Update;
String mail = getTransport().convertJIDToID(contact.getJID());
user2Update = conn.getRoster().getEntry(mail);
user2Update.setName(contact.getNickname());
Collection<String> newgroups = contact.get... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "updateContact" | "public void updateContact(TransportBuddy contact) {
RosterEntry user2Update;
String mail = getTransport().convertJIDToID(contact.getJID());
user2Update = conn.getRoster().getEntry(mail);
user2Update.setName(contact.getNickname());
Collection<String> newgroups = contact.get... |
Inversion-Mutation | megadiff | "public int forwardRemotePort(String fwdAddress, int fwdPort, IProgressMonitor monitor) throws RemoteConnectionException {
if (!isOpen()) {
throw new RemoteConnectionException(Messages.RemoteToolsConnection_connectionNotOpen);
}
SubMonitor progress = SubMonitor.convert(monitor, 10);
try {
progress.b... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "forwardRemotePort" | "public int forwardRemotePort(String fwdAddress, int fwdPort, IProgressMonitor monitor) throws RemoteConnectionException {
if (!isOpen()) {
throw new RemoteConnectionException(Messages.RemoteToolsConnection_connectionNotOpen);
}
SubMonitor progress = SubMonitor.convert(monitor, 10);
try {
progress.b... |
Inversion-Mutation | megadiff | "public void popupDismissed(boolean topPopupOnly) {
initializePopup();
// if the 2nd level popup gets dismissed
if (mPopupStatus == POPUP_SECOND_LEVEL) {
mPopupStatus = POPUP_FIRST_LEVEL;
if (topPopupOnly) mUI.showPopup(mPopup);
}
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "popupDismissed" | "public void popupDismissed(boolean topPopupOnly) {
// if the 2nd level popup gets dismissed
if (mPopupStatus == POPUP_SECOND_LEVEL) {
<MASK>initializePopup();</MASK>
mPopupStatus = POPUP_FIRST_LEVEL;
if (topPopupOnly) mUI.showPopup(mPopup);
}
}" |
Inversion-Mutation | megadiff | "public void dispose() {
if (dataSource.isEditable()) {
try {
dataSource.removeEditionListener(dataSourceListener);
dataSource.removeMetadataEditionListener(dataSourceListener);
} catch ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "dispose" | "public void dispose() {
<MASK>dataSource.removeEditionListener(dataSourceListener);</MASK>
if (dataSource.isEditable()) {
try {
dataSource.removeMetadataEditionListener(dataSourceListener);
} catch (Un... |
Inversion-Mutation | megadiff | "@Override
public ActionForward execute(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
HttpServletResponse response, User user) throws Exception {
request.setAttribute("myGames", findGamesForUser(user));
request.setAttribute("game", user.getActiveGame());
Board board = nu... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "execute" | "@Override
public ActionForward execute(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
HttpServletResponse response, User user) throws Exception {
request.setAttribute("myGames", findGamesForUser(user));
request.setAttribute("game", user.getActiveGame());
Board board = nu... |
Inversion-Mutation | megadiff | "private void addTemporaryWallpaperTile(Uri uri) {
mTempWallpaperTiles.add(uri);
// Add a tile for the image picked from Gallery
FrameLayout pickedImageThumbnail = (FrameLayout) getLayoutInflater().
inflate(R.layout.wallpaper_picker_item, mWallpapersView, false);
set... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "addTemporaryWallpaperTile" | "private void addTemporaryWallpaperTile(Uri uri) {
mTempWallpaperTiles.add(uri);
// Add a tile for the image picked from Gallery
FrameLayout pickedImageThumbnail = (FrameLayout) getLayoutInflater().
inflate(R.layout.wallpaper_picker_item, mWallpapersView, false);
set... |
Inversion-Mutation | megadiff | "@Override
public boolean onTouch(View v, MotionEvent event) {
if (mIsAnswering) {
return true;
}
if (gestureDetector.onTouchEvent(event)) {
return true;
}
if (mPrefTextSelection && !mLongClickWorkaround) {
swi... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onTouch" | "@Override
public boolean onTouch(View v, MotionEvent event) {
if (mIsAnswering) {
return true;
}
if (gestureDetector.onTouchEvent(event)) {
return true;
}
if (mPrefTextSelection && !mLongClickWorkaround) {
swi... |
Inversion-Mutation | megadiff | "public static CharSequence scrape(final String url, final boolean isPost, final String request, String encoding, final boolean cookieHandling)
throws IOException
{
if (encoding == null)
encoding = SCRAPE_DEFAULT_ENCODING;
int tries = 3;
while (true)
{
try
{
final StringBuilder b... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "scrape" | "public static CharSequence scrape(final String url, final boolean isPost, final String request, String encoding, final boolean cookieHandling)
throws IOException
{
if (encoding == null)
encoding = SCRAPE_DEFAULT_ENCODING;
<MASK>final StringBuilder buffer = new StringBuilder(SCRAPE_INITIAL_CAPACITY);<... |
Inversion-Mutation | megadiff | "public static void establishMidiBridge(BluetoothMidiService service, BluetoothSppObserver observer) throws IOException {
BluetoothMidiBridge bridge = new BluetoothMidiBridge(service, observer);
service.init(bridge);
PdBase.setMidiReceiver(bridge);
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "establishMidiBridge" | "public static void establishMidiBridge(BluetoothMidiService service, BluetoothSppObserver observer) throws IOException {
BluetoothMidiBridge bridge = new BluetoothMidiBridge(service, observer);
<MASK>PdBase.setMidiReceiver(bridge);</MASK>
service.init(bridge);
}" |
Inversion-Mutation | megadiff | "public static boolean parseTrackLine(String nextLine, TrackProperties trackProperties)
throws NumberFormatException {
boolean foundProperties = false;
try {
// track type=wiggle_0 name="CSF +" description="CSF +" visibility=full autoScale=off viewLimits=-50:50
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "parseTrackLine" | "public static boolean parseTrackLine(String nextLine, TrackProperties trackProperties)
throws NumberFormatException {
boolean foundProperties = false;
try {
// track type=wiggle_0 name="CSF +" description="CSF +" visibility=full autoScale=off viewLimits=-50:50
... |
Inversion-Mutation | megadiff | "private static void decodeTextSegment(BitSource bits, StringBuffer result) throws FormatException {
// Three Text values are encoded in a 16-bit value as
// (1600 * C1) + (40 * C2) + C3 + 1
// TODO(bbrown): The Upper Shift with Text doesn't work in the 4 value scenario all the time
boolean upperShi... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "decodeTextSegment" | "private static void decodeTextSegment(BitSource bits, StringBuffer result) throws FormatException {
// Three Text values are encoded in a 16-bit value as
// (1600 * C1) + (40 * C2) + C3 + 1
// TODO(bbrown): The Upper Shift with Text doesn't work in the 4 value scenario all the time
boolean upperShi... |
Inversion-Mutation | megadiff | "private FeatureResultSet queryByIdFilterRelational( IdFilter filter, SortProperty[] sortCrit )
throws FeatureStoreException {
LinkedHashMap<QName, List<IdAnalysis>> ftNameToIdAnalysis = new LinkedHashMap<QName, List<IdAnalysis>>();
try {
for ( String fid : ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "queryByIdFilterRelational" | "private FeatureResultSet queryByIdFilterRelational( IdFilter filter, SortProperty[] sortCrit )
throws FeatureStoreException {
LinkedHashMap<QName, List<IdAnalysis>> ftNameToIdAnalysis = new LinkedHashMap<QName, List<IdAnalysis>>();
try {
for ( String fid : ... |
Inversion-Mutation | megadiff | "public void start() {
if(started) {
throw new IllegalStateException("Proxy branch alredy started!");
}
if(canceled) {
throw new IllegalStateException("Proxy branch was cancelled, you must create a new branch!");
}
if(timedOut) {
throw new IllegalStateException("Proxy brnach has timed out!");... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "start" | "public void start() {
if(started) {
throw new IllegalStateException("Proxy branch alredy started!");
}
if(canceled) {
throw new IllegalStateException("Proxy branch was cancelled, you must create a new branch!");
}
if(timedOut) {
throw new IllegalStateException("Proxy brnach has timed out!");... |
Inversion-Mutation | megadiff | "public void onDisable()
{
if (isReady)
{
HeroesDamageFix.reset();
debugLogger.info(savePets(true) + " pet/pets saved.");
for (MyPet myPet : MyPetList.getAllMyPets())
{
myPet.removePet();
}
}
getTi... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onDisable" | "public void onDisable()
{
if (isReady)
{
debugLogger.info(savePets(true) + " pet/pets saved.");
for (MyPet myPet : MyPetList.getAllMyPets())
{
myPet.removePet();
}
}
getTimer().stopTimer();
MyPetList... |
Inversion-Mutation | megadiff | "@Override
public void buttonClick(ClickEvent event) {
if (event.getButton()
.getCaption()
.equals("Zurücksetzen")) {
controlledView.reset();
} else if (event.getButton()
.getCaption()
.equals("Beantragen")) {
Request r = controlledView.getRequest();
if (r == null) {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "buttonClick" | "@Override
public void buttonClick(ClickEvent event) {
if (event.getButton()
.getCaption()
.equals("Zurücksetzen")) {
controlledView.reset();
} else if (event.getButton()
.getCaption()
.equals("Beantragen")) {
Request r = controlledView.getRequest();
if (r == null) {
... |
Inversion-Mutation | megadiff | "@Override
public void onDestroy() {
synchronized(sSyncLock) {
alwaysLog("!!! EAS ExchangeService, onDestroy");
// Stop the sync manager thread and return
synchronized (sSyncLock) {
if (sServiceThread != null) {
sStop = true;
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onDestroy" | "@Override
public void onDestroy() {
synchronized(sSyncLock) {
alwaysLog("!!! EAS ExchangeService, onDestroy");
// Stop the sync manager thread and return
synchronized (sSyncLock) {
<MASK>sStop = true;</MASK>
if (sServiceThread != nu... |
Inversion-Mutation | megadiff | "public String replaceMacros(CommandSender sender, String message) {
Player[] online = getServer().getOnlinePlayers();
message = message.replace("%name%", toName(sender));
message = message.replace("%id%", toUniqueName(sender));
message = message.replace("%online%", String.valueOf(... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "replaceMacros" | "public String replaceMacros(CommandSender sender, String message) {
Player[] online = getServer().getOnlinePlayers();
message = message.replace("%name%", toName(sender));
message = message.replace("%id%", toUniqueName(sender));
if (sender instanceof Player) {
Playe... |
Inversion-Mutation | megadiff | "public static RubyDebuggerProxy startRubyDebug(
final Descriptor descriptor,
final String rdebugExecutable,
final String interpreter,
final int timeout) throws IOException, RubyDebuggerException {
descriptor.setType(RUBY_DEBUG);
List<String> args = ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "startRubyDebug" | "public static RubyDebuggerProxy startRubyDebug(
final Descriptor descriptor,
final String rdebugExecutable,
final String interpreter,
final int timeout) throws IOException, RubyDebuggerException {
descriptor.setType(RUBY_DEBUG);
List<String> args = ... |
Inversion-Mutation | megadiff | "protected void handleClasspathDefaultButtonSelected() {
boolean useDefault = fClassPathDefaultButton.getSelection();
fClassPathDefaultButton.setSelection(useDefault);
if (useDefault) {
displayDefaultClasspath();
}
fClasspathViewer.setEnabled(!useDefault);
fBootpathViewer.setEnabled(!useDefault);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "handleClasspathDefaultButtonSelected" | "protected void handleClasspathDefaultButtonSelected() {
boolean useDefault = fClassPathDefaultButton.getSelection();
fClassPathDefaultButton.setSelection(useDefault);
if (useDefault) {
displayDefaultClasspath();
}
fClasspathViewer.setEnabled(!useDefault);
fBootpathViewer.setEnabled(!useDefault);
... |
Inversion-Mutation | megadiff | "@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.main);
sonido = R.raw.fua3;
btnFua = (Button) findViewById(R.id.button1);
imageView=(ImageView) findViewById(R.id.ImageView1);
bt... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onCreate" | "@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.main);
sonido = R.raw.fua3;
btnFua = (Button) findViewById(R.id.button1);
imageView=(ImageView) findViewById(R.id.ImageView1);
bt... |
Inversion-Mutation | megadiff | "@Override
public void onClick(View v) {
imageView.setImageResource(img);
Thread x = new Thread(new Runnable() {
@Override
public void run() {
MediaPlayer mp = MediaPlayer.create(FuaaaActivity.this,
sonido);
mp.start();
while (mp.isPlaying()) {
}
}
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onClick" | "@Override
public void onClick(View v) {
Thread x = new Thread(new Runnable() {
@Override
public void run() {
MediaPlayer mp = MediaPlayer.create(FuaaaActivity.this,
sonido);
<MASK>imageView.setImageResource(img);</MASK>
mp.start();
while (mp.isPlaying()) {
... |
Inversion-Mutation | megadiff | "public DataSourceTableModel(TableEditableElement element) {
this.element = element;
dataSource = element.getDataSource();
dataSourceListener = new ModificationListener();
if(dataSource.isEditable()) {
try {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "DataSourceTableModel" | "public DataSourceTableModel(TableEditableElement element) {
this.element = element;
dataSource = element.getDataSource();
dataSourceListener = new ModificationListener();
if(dataSource.isEditable()) {
try {
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.