type stringclasses 1
value | dataset stringclasses 1
value | input stringlengths 75 160k | instruction stringlengths 117 171 | output stringlengths 88 168k |
|---|---|---|---|---|
Inversion-Mutation | megadiff | "@Override
public void configure() {
createDefaultPresenter();
createAndHandleHistory();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "configure" | "@Override
public void configure() {
<MASK>createAndHandleHistory();</MASK>
createDefaultPresenter();
}" |
Inversion-Mutation | megadiff | "private Map<String, EObject> initMetaElementsInAllResources() {
Map<String, EObject> eClassifiers = new HashMap<String, EObject>();
for (Resource res : getReferencedResources()) {
initMetaElements(eClassifiers, res.getContents().iterator(), null);
}
initMetaElements(eClassifiers, getResource().getCont... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "initMetaElementsInAllResources" | "private Map<String, EObject> initMetaElementsInAllResources() {
Map<String, EObject> eClassifiers = new HashMap<String, EObject>();
<MASK>initMetaElements(eClassifiers, getResource().getContents().iterator(), null);</MASK>
for (Resource res : getReferencedResources()) {
initMetaElements(eClassifiers, res.... |
Inversion-Mutation | megadiff | "public GUI(JDesktopPane desktop) {
myGUI = this;
mySimulation = null;
myDesktopPane = desktop;
if (menuPlugins == null) {
menuPlugins = new JMenu("Plugins");
menuPlugins.removeAll();
/* COOJA/GUI plugins at top, simulation plugins in middle, mote plugins at bottom */
m... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "GUI" | "public GUI(JDesktopPane desktop) {
myGUI = this;
mySimulation = null;
myDesktopPane = desktop;
if (menuPlugins == null) {
menuPlugins = new JMenu("Plugins");
menuPlugins.removeAll();
/* COOJA/GUI plugins at top, simulation plugins in middle, mote plugins at bottom */
m... |
Inversion-Mutation | megadiff | "protected void execute( IContent content, IReportItemExecutor executor )
throws BirtException
{
assert executor != null;
while ( executor.hasNextChild( ) )
{
IReportItemExecutor childExecutor = executor.getNextChild( );
if ( childExecutor != null )
{
IContent childContent = childExe... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "execute" | "protected void execute( IContent content, IReportItemExecutor executor )
throws BirtException
{
assert executor != null;
while ( executor.hasNextChild( ) )
{
IReportItemExecutor childExecutor = executor.getNextChild( );
if ( childExecutor != null )
{
IContent childContent = childExe... |
Inversion-Mutation | megadiff | "public Long[][] sortHashMapIntoArray() {
Set<Long> patterns = patternSeen.keySet();
Long[][] initialPatternSeen = new Long[patterns.size()][2];
int index = 0;
for(Long pattern : patterns) {
initialPatternSeen[index][0] = pattern;
initialPatternSeen[index][1] = patternSeen.get(pattern)[0];
inde... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "sortHashMapIntoArray" | "public Long[][] sortHashMapIntoArray() {
Set<Long> patterns = patternSeen.keySet();
Long[][] initialPatternSeen = new Long[patterns.size()][2];
int index = 0;
for(Long pattern : patterns) {
initialPatternSeen[index][0] = pattern;
initialPatternSeen[index][1] = patternSeen.get(pattern)[0];
inde... |
Inversion-Mutation | megadiff | "@Override
public void onCreate(Bundle savedInstanceState) {
SetupData.restore(savedInstanceState);
super.onCreate(savedInstanceState);
if (DEBUG_SETUP_FLOWS) {
Log.d(getClass().getName(), SetupData.debugString());
}
}" | 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) {
<MASK>super.onCreate(savedInstanceState);</MASK>
SetupData.restore(savedInstanceState);
if (DEBUG_SETUP_FLOWS) {
Log.d(getClass().getName(), SetupData.debugString());
}
}" |
Inversion-Mutation | megadiff | "@Override
public void write(byte[] b, int off, int len) throws IOException {
if (b == null) {
throw new NullPointerException();
} else if ((off < 0) || (off > b.length) || (len < 0) ||
((off + len) > b.length) || ((off + len) < 0)) {
throw new IndexOutOfBoundsException();
}
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "write" | "@Override
public void write(byte[] b, int off, int len) throws IOException {
if (b == null) {
throw new NullPointerException();
} else if ((off < 0) || (off > b.length) || (len < 0) ||
((off + len) > b.length) || ((off + len) < 0)) {
throw new IndexOutOfBoundsException();
}
... |
Inversion-Mutation | megadiff | "public UnilateralSortMerger(MemoryManager memoryManager, IOManager ioManager,
long totalMemory, long maxWriteMem, int numSortBuffers, int maxNumFileHandles,
Comparator<Key>[] keyComparators, int[] keyPositions, Class<? extends Key>[] keyClasses,
MutableObjectIterator<PactRecord> input, AbstractInvokable pa... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "UnilateralSortMerger" | "public UnilateralSortMerger(MemoryManager memoryManager, IOManager ioManager,
long totalMemory, long maxWriteMem, int numSortBuffers, int maxNumFileHandles,
Comparator<Key>[] keyComparators, int[] keyPositions, Class<? extends Key>[] keyClasses,
MutableObjectIterator<PactRecord> input, AbstractInvokable pa... |
Inversion-Mutation | megadiff | "private void showDiff(RevCommit c) throws IOException {
final RevTree a = c.getParent(0).getTree();
final RevTree b = c.getTree();
if (showNameAndStatusOnly)
Diff.nameStatus(out, diffFmt.scan(a, b));
else {
out.flush();
diffFmt.format(a, b);
diffFmt.flush();
}
out.println();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "showDiff" | "private void showDiff(RevCommit c) throws IOException {
final RevTree a = c.getParent(0).getTree();
final RevTree b = c.getTree();
if (showNameAndStatusOnly)
Diff.nameStatus(out, diffFmt.scan(a, b));
else {
diffFmt.format(a, b);
diffFmt.flush();
}
out.println();
<MASK>out.flush();</... |
Inversion-Mutation | megadiff | "public static String getServerLocation() {
if (!initialized) {
try {
//make sure the http registry is started
ensureBundleStarted(EQUINOX_HTTP_JETTY);
ensureBundleStarted(EQUINOX_HTTP_REGISTRY);
//get the webide bundle started via lazy activation.
org.eclipse.orion.server.authenticatio... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getServerLocation" | "public static String getServerLocation() {
if (!initialized) {
try {
<MASK>initialize();</MASK>
//make sure the http registry is started
ensureBundleStarted(EQUINOX_HTTP_JETTY);
ensureBundleStarted(EQUINOX_HTTP_REGISTRY);
//get the webide bundle started via lazy activation.
org.ecl... |
Inversion-Mutation | megadiff | "public void configure() throws CoreException {
/*since we reuse the dynamic web project,we need to identify it when adding the project nature
to do that we keep this variable as a switch*/
JavaUtils.isWebApp = true;
addJavaProjectNature();
try {
updatePom();
} catch (Exception e) {
log.error... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "configure" | "public void configure() throws CoreException {
/*since we reuse the dynamic web project,we need to identify it when adding the project nature
to do that we keep this variable as a switch*/
JavaUtils.isWebApp = true;
addJavaProjectNature();
<MASK>JavaUtils.isWebApp = false;</MASK>
try {
updatePom(... |
Inversion-Mutation | megadiff | "@Override
public void execute() {
if (addProduct != null) {
addProduct.execute();
product = addProduct.getProduct();
}
if (!addedItems.isEmpty()) {
for (Item item : addedItems) {
container.add(item);
itemManager.manage(item);
BarcodePrinter.getInstance().addItemToBatch(item);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "execute" | "@Override
public void execute() {
if (addProduct != null) {
addProduct.execute();
product = addProduct.getProduct();
}
if (!addedItems.isEmpty()) {
for (Item item : addedItems) {
<MASK>itemManager.manage(item);</MASK>
container.add(item);
BarcodePrinter.getInstance().addItemToBat... |
Inversion-Mutation | megadiff | "@Override
protected void closeWebSocket() throws WebSocketException {
transitionTo(State.CLOSING);
pipeline.sendUpstream(this, null, new CloseFrame());
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "closeWebSocket" | "@Override
protected void closeWebSocket() throws WebSocketException {
<MASK>pipeline.sendUpstream(this, null, new CloseFrame());</MASK>
transitionTo(State.CLOSING);
}" |
Inversion-Mutation | megadiff | "private void visitClassInternal(ClassNode node) {
visitAnnotations(node);
VariableScope scope = scopes.peek();
TypeLookupResult result = null;
result = new TypeLookupResult(node, node, node, TypeConfidence.EXACT, scope);
VisitStatus status = handleRequestor(node, requestor, result);
switch (status... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "visitClassInternal" | "private void visitClassInternal(ClassNode node) {
visitAnnotations(node);
TypeLookupResult result = null;
<MASK>VariableScope scope = scopes.peek();</MASK>
result = new TypeLookupResult(node, node, node, TypeConfidence.EXACT, scope);
VisitStatus status = handleRequestor(node, requestor, result);
s... |
Inversion-Mutation | megadiff | "private static IScope getContainingScopeOrNull(IASTName name) {
if (name == null) {
return null;
}
IASTNode parent = name.getParent();
try {
if (parent instanceof ICPPASTTemplateId) {
name = (IASTName) parent;
parent = name.getParent();
}
ICPPASTTemplateDec... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getContainingScopeOrNull" | "private static IScope getContainingScopeOrNull(IASTName name) {
if (name == null) {
return null;
}
IASTNode parent = name.getParent();
try {
if (parent instanceof ICPPASTTemplateId) {
name = (IASTName) parent;
parent = name.getParent();
}
ICPPASTTemplateDec... |
Inversion-Mutation | megadiff | "@Override
protected String getInsertStatement(InsertOrUpdateStatement insertOrUpdateStatement, Database database, SqlGeneratorChain sqlGeneratorChain) {
StringBuffer sql = new StringBuffer(super.getInsertStatement(insertOrUpdateStatement, database, sqlGeneratorChain));
sql.deleteCharAt... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getInsertStatement" | "@Override
protected String getInsertStatement(InsertOrUpdateStatement insertOrUpdateStatement, Database database, SqlGeneratorChain sqlGeneratorChain) {
StringBuffer sql = new StringBuffer(super.getInsertStatement(insertOrUpdateStatement, database, sqlGeneratorChain));
sql.deleteCharAt... |
Inversion-Mutation | megadiff | "public void executeAfpEngine(AfpProcessProgress progress){
if (afpNode != null ){
parameters = new HashMap<String, String>();
parameters.put(ControlFileProperties.SITE_SPACING, "2");
parameters.put(ControlFileProperties.CELL_SPACING, "0");
parameters.put(ControlFileProperties.REG_NBR_SPA... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "executeAfpEngine" | "public void executeAfpEngine(AfpProcessProgress progress){
if (afpNode != null ){
parameters = new HashMap<String, String>();
parameters.put(ControlFileProperties.SITE_SPACING, "2");
parameters.put(ControlFileProperties.CELL_SPACING, "0");
parameters.put(ControlFileProperties.REG_NBR_SPA... |
Inversion-Mutation | megadiff | "private void parseObjectBlock(SunflowAPI api) throws ParserException, IOException {
p.checkNextToken("{");
boolean noInstance = false;
Matrix4 transform = null;
String name = null;
String[] shaders = null;
String[] modifiers = null;
if (p.peekNextToken("no... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "parseObjectBlock" | "private void parseObjectBlock(SunflowAPI api) throws ParserException, IOException {
p.checkNextToken("{");
boolean noInstance = false;
Matrix4 transform = null;
String name = null;
String[] shaders = null;
String[] modifiers = null;
if (p.peekNextToken("no... |
Inversion-Mutation | megadiff | "public Boolean invoke(File ws, VirtualChannel channel) throws IOException {
for (ModuleLocation l : locations) {
String moduleName = l.getLocalDir();
File module = new File(ws,moduleName).getCanonicalFile(); // canonicalize to remove ".." and ".". See #474
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "invoke" | "public Boolean invoke(File ws, VirtualChannel channel) throws IOException {
for (ModuleLocation l : locations) {
String moduleName = l.getLocalDir();
File module = new File(ws,moduleName).getCanonicalFile(); // canonicalize to remove ".." and ".". See #474
... |
Inversion-Mutation | megadiff | "private void delayedCleanupAfterDisconnect() {
if (VDBG) log("delayedCleanupAfterDisconnect()... Phone state = " + mCM.getState());
// Clean up any connections in the DISCONNECTED state.
//
// [Background: Even after a connection gets disconnected, its
// Connection obje... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "delayedCleanupAfterDisconnect" | "private void delayedCleanupAfterDisconnect() {
if (VDBG) log("delayedCleanupAfterDisconnect()... Phone state = " + mCM.getState());
// Clean up any connections in the DISCONNECTED state.
//
// [Background: Even after a connection gets disconnected, its
// Connection obje... |
Inversion-Mutation | megadiff | "public void promptNew() {
promptSave("Would you like to save before starting a new file?");
file = null;
saved = true;
inputArea.setText("");
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "promptNew" | "public void promptNew() {
promptSave("Would you like to save before starting a new file?");
<MASK>inputArea.setText("");</MASK>
file = null;
saved = true;
}" |
Inversion-Mutation | megadiff | "public static ProjectData getGlobalProjectData()
{
if (globalProjectData != null)
return globalProjectData;
globalProjectData = new ProjectData();
initialize();
return globalProjectData;
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getGlobalProjectData" | "public static ProjectData getGlobalProjectData()
{
if (globalProjectData != null)
return globalProjectData;
<MASK>initialize();</MASK>
globalProjectData = new ProjectData();
return globalProjectData;
}" |
Inversion-Mutation | megadiff | "private void setLayer(int layerNum, int layerType)
{
layerUsed = true;
layerIsPin = false;
Integer layerInt = new Integer(layerNum + (layerType<<16));
Layer layer = (Layer)layerNames.get(layerInt);
if (layer == null)
{
if (IOTool.isGDSInIgnoresUnknownLayers())
{
System.out.println("GDS... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setLayer" | "private void setLayer(int layerNum, int layerType)
{
layerUsed = true;
layerIsPin = false;
Integer layerInt = new Integer(layerNum + (layerType<<16));
Layer layer = (Layer)layerNames.get(layerInt);
if (layer == null)
{
if (IOTool.isGDSInIgnoresUnknownLayers())
{
System.out.println("GDS... |
Inversion-Mutation | megadiff | "public static Node findOrCreateOSSNode(OssType ossType,String ossName,GraphDatabaseService neo) {
Node oss;
Transaction tx = neo.beginTx();
try {
oss = NeoUtils.findRootNodeByName(ossName, neo);
if (oss == null) {
oss = neo.createNode();
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "findOrCreateOSSNode" | "public static Node findOrCreateOSSNode(OssType ossType,String ossName,GraphDatabaseService neo) {
Node oss;
Transaction tx = neo.beginTx();
try {
oss = NeoUtils.findRootNodeByName(ossName, neo);
if (oss == null) {
oss = neo.createNode();
... |
Inversion-Mutation | megadiff | "@TestTargetNew(
level = TestLevel.COMPLETE,
method = "setDither",
args = {boolean.class}
)
public void testSetDither() {
assertConstantStateNotSet();
assertNull(mDrawableContainer.getCurrent());
mDrawableContainer.setConstantState(mDrawableContainerStat... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "testSetDither" | "@TestTargetNew(
level = TestLevel.COMPLETE,
method = "setDither",
args = {boolean.class}
)
public void testSetDither() {
assertConstantStateNotSet();
assertNull(mDrawableContainer.getCurrent());
mDrawableContainer.setDither(false);
mDrawableCo... |
Inversion-Mutation | megadiff | "public void run()
{
if ( lifecycle != null )
{
throw new IllegalStateException(
"Can't start new database: the old one isn't shutdown properly." );
}
logInfo( "trying to start/connect ..."... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "public void run()
{
if ( lifecycle != null )
{
throw new IllegalStateException(
"Can't start new database: the old one isn't shutdown properly." );
}
logInfo( "trying to start/connect ..."... |
Inversion-Mutation | megadiff | "protected void acquirePoint(boolean start, boolean collectDetectors) throws Exception {
TreeMap<Integer, Scannable[]> devicesToMoveByLevel;
if(collectDetectors) {
devicesToMoveByLevel = generateDevicesToMoveByLevel(scannableLevels, allDetectors);
} else {
devicesToMoveByLevel = scannableLevels;
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "acquirePoint" | "protected void acquirePoint(boolean start, boolean collectDetectors) throws Exception {
TreeMap<Integer, Scannable[]> devicesToMoveByLevel;
if(collectDetectors) {
devicesToMoveByLevel = generateDevicesToMoveByLevel(scannableLevels, allDetectors);
} else {
devicesToMoveByLevel = scannableLevels;
... |
Inversion-Mutation | megadiff | "public void setupWebView() {
mDestroyed = false;
// create a webview
mWebView = new WebView(getBaseActivity());
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.setBackgroundColor(0x00000000);
mWebView.getSettings().setAllowFileAccess(true);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setupWebView" | "public void setupWebView() {
mDestroyed = false;
// create a webview
mWebView = new WebView(getBaseActivity());
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.getSettings().setAllowFileAccess(true);
mWebView.getSettings().setUseWideViewPort(true);... |
Inversion-Mutation | megadiff | "public void due(final Scheduler scheduler, final long timestamp,
final Object object) {
final ServiceURL service = (ServiceURL) object;
final RemoteServiceRegistration rs = (RemoteServiceRegistration) serviceRegistrations
.get(service.toString());
try {
System.out.println("RS: " + rs);
Sys... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "due" | "public void due(final Scheduler scheduler, final long timestamp,
final Object object) {
final ServiceURL service = (ServiceURL) object;
final RemoteServiceRegistration rs = (RemoteServiceRegistration) serviceRegistrations
.get(service.toString());
try {
System.out.println("RS: " + rs);
<MAS... |
Inversion-Mutation | megadiff | "public boolean onCommand(CommandSender sender, Command command, String label, String[] args)
{
if (sender instanceof Player)
{
Player petOwner = (Player) sender;
if (MyPetList.hasMyPet(petOwner))
{
MyPet myPet = MyPetList.getMyPet(petOwner)... | 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)
{
if (sender instanceof Player)
{
Player petOwner = (Player) sender;
if (MyPetList.hasMyPet(petOwner))
{
MyPet myPet = MyPetList.getMyPet(petOwner)... |
Inversion-Mutation | megadiff | "public static void main(String[] args) {
long sTime = System.currentTimeMillis();
System.out.println("OntoStarUrlFetcher started");
File stopFile = new File(Configuration.stopFile);
File stoppedFile = new File(Configuration.stoppedFile);
File runFile = new File(Configuration.runFile);
UrlMySQLI... | 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) {
long sTime = System.currentTimeMillis();
System.out.println("OntoStarUrlFetcher started");
File stopFile = new File(Configuration.stopFile);
File stoppedFile = new File(Configuration.stoppedFile);
File runFile = new File(Configuration.runFile);
UrlMySQLI... |
Inversion-Mutation | megadiff | "public void capturePhoto(View v){
Log.e("Thisisit", "entered capturePhoto");
//if (currentTask == 1 || currentTask == 2) {
Log.e("Thisisit", "hello");
String replacementImage = null;
//if (currentTask == 1) {
replacementImage = "/sdcard/Pictures/NickCage.png";
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "capturePhoto" | "public void capturePhoto(View v){
Log.e("Thisisit", "entered capturePhoto");
//if (currentTask == 1 || currentTask == 2) {
Log.e("Thisisit", "hello");
String replacementImage = null;
//if (currentTask == 1) {
replacementImage = "/sdcard/Pictures/NickCage.png";
... |
Inversion-Mutation | megadiff | "public void writeToStream(OutputStream os) throws IOException {
setFullyQualifiedName(
FullyQualifiedNameTriplet.TYPE_ATTRIBUTE_GID,
FullyQualifiedNameTriplet.FORMAT_CHARSTR,
name);
setAttributeValue(value);
setAttributeQualifier(tleID, 1);... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "writeToStream" | "public void writeToStream(OutputStream os) throws IOException {
setFullyQualifiedName(
FullyQualifiedNameTriplet.TYPE_ATTRIBUTE_GID,
FullyQualifiedNameTriplet.FORMAT_CHARSTR,
name);
<MASK>setAttributeQualifier(tleID, 1);</MASK>
setAttributeV... |
Inversion-Mutation | megadiff | "public boolean updateSourceStatusStartup(int id, long queueSize, long doneQueueSize) {
MongoDBCollection coll = new MongoDBCollection(db,"sources");
String query = String.format("{\"id\": %1$s}", id);
BasicDBObject docsearch = MongoDBHelper.JSON2BasicDBObject(query);
synchronized (sourcesCollMonitor) ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "updateSourceStatusStartup" | "public boolean updateSourceStatusStartup(int id, long queueSize, long doneQueueSize) {
MongoDBCollection coll = new MongoDBCollection(db,"sources");
String query = String.format("{\"id\": %1$s}", id);
BasicDBObject docsearch = MongoDBHelper.JSON2BasicDBObject(query);
synchronized (sourcesCollMonitor) ... |
Inversion-Mutation | megadiff | "public void printReport() throws DocumentException {
Hashtable<ExamPeriod,TreeSet<ExamSectionInfo>> period2courseSections = new Hashtable();
for (ExamAssignmentInfo exam : getExams()) {
if (exam.getPeriod()==null) continue;
TreeSet<ExamSectionInfo> sections = period2courseSe... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "printReport" | "public void printReport() throws DocumentException {
Hashtable<ExamPeriod,TreeSet<ExamSectionInfo>> period2courseSections = new Hashtable();
for (ExamAssignmentInfo exam : getExams()) {
if (exam.getPeriod()==null) continue;
TreeSet<ExamSectionInfo> sections = period2courseSe... |
Inversion-Mutation | megadiff | "public MyPetAIAggressiveTarget(EntityMyPet petEntity, float range)
{
this.petEntity = petEntity;
this.myPet = petEntity.getMyPet();
this.petOwnerEntity = ((CraftPlayer) myPet.getOwner().getPlayer()).getHandle();
this.range = range;
if (myPet.getSkills().hasSkill("Beha... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "MyPetAIAggressiveTarget" | "public MyPetAIAggressiveTarget(EntityMyPet petEntity, float range)
{
this.petEntity = petEntity;
<MASK>this.petOwnerEntity = ((CraftPlayer) myPet.getOwner().getPlayer()).getHandle();</MASK>
this.myPet = petEntity.getMyPet();
this.range = range;
if (myPet.getSkills().h... |
Inversion-Mutation | megadiff | "private void writeResult(String sql, String s, SQLException e) throws Exception {
assertKnownException(e);
s = ("> " + s).trim();
String compare = readLine();
if (compare != null && compare.startsWith(">")) {
if (!compare.equals(s)) {
if (alwaysReconnec... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "writeResult" | "private void writeResult(String sql, String s, SQLException e) throws Exception {
assertKnownException(e);
s = ("> " + s).trim();
String compare = readLine();
if (compare != null && compare.startsWith(">")) {
if (!compare.equals(s)) {
if (alwaysReconnec... |
Inversion-Mutation | megadiff | "protected final void scanElementDecl() throws IOException, XNIException {
// spaces
fReportEntity = false;
if (!skipSeparator(true, !scanningInternalSubset())) {
reportFatalError("MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ELEMENTDECL",
null);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "scanElementDecl" | "protected final void scanElementDecl() throws IOException, XNIException {
// spaces
fReportEntity = false;
if (!skipSeparator(true, !scanningInternalSubset())) {
reportFatalError("MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ELEMENTDECL",
null);
... |
Inversion-Mutation | megadiff | "public <T extends Holder> T setHolder(Class<?> specializationClass, Holder attribute, Serializable value, int metaLevel, int basePos, boolean existsException, Generic... targets) {
// assert attribute.getMetaLevel() >= metaLevel;
Generic meta = metaLevel == attribute.getMetaLevel() ? attribute.getMeta() : attrib... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setHolder" | "public <T extends Holder> T setHolder(Class<?> specializationClass, Holder attribute, Serializable value, int metaLevel, int basePos, boolean existsException, Generic... targets) {
// assert attribute.getMetaLevel() >= metaLevel;
Generic meta = metaLevel == attribute.getMetaLevel() ? attribute.getMeta() : attrib... |
Inversion-Mutation | megadiff | "public String getErrorsDisplay() {
StringBuilder sb = new StringBuilder("<html>");
sb.append("<h3>Input was not valid</h3>");
for ( Map.Entry<String, List<String>> e : errors.entrySet() ) {
sb.append("<h4>");
sb.append(e.getKey()).append(":")... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getErrorsDisplay" | "public String getErrorsDisplay() {
StringBuilder sb = new StringBuilder("<html>");
sb.append("<h3>Input was not valid</h3>");
for ( Map.Entry<String, List<String>> e : errors.entrySet() ) {
sb.append("<h4>");
sb.append(e.getKey()).append(":")... |
Inversion-Mutation | megadiff | "@Override
public boolean onTouchEvent(MotionEvent event) {
int x = (int)event.getX();
int y = (int)event.getY();
final ZLView view = ZLApplication.Instance().getCurrentView();
switch (event.getAction()) {
case MotionEvent.ACTION_UP:
if (myPendingDoubleTap) {
view.onFingerDoubleTap();
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onTouchEvent" | "@Override
public boolean onTouchEvent(MotionEvent event) {
int x = (int)event.getX();
int y = (int)event.getY();
final ZLView view = ZLApplication.Instance().getCurrentView();
switch (event.getAction()) {
case MotionEvent.ACTION_UP:
if (myPendingDoubleTap) {
view.onFingerDoubleTap();
... |
Inversion-Mutation | megadiff | "@Override
public void onRestoreInstanceState(Parcelable state) {
final SavedState savedState = (SavedState) state;
mSticker.createSticker(savedState.currentStickerSection);
super.onRestoreInstanceState(savedState.getSuperState());
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onRestoreInstanceState" | "@Override
public void onRestoreInstanceState(Parcelable state) {
final SavedState savedState = (SavedState) state;
<MASK>super.onRestoreInstanceState(savedState.getSuperState());</MASK>
mSticker.createSticker(savedState.currentStickerSection);
}" |
Inversion-Mutation | megadiff | "private void handleRefresh() {
if (!this.refresh)
return;
XMLModelNotifier notifier = getModelNotifier();
boolean isChanging = notifier.isChanging();
if (!isChanging)
notifier.beginChanging(true);
XMLModelParser parser = getModelParser();
setActive(parser);
this.document.removeChildNodes()... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "handleRefresh" | "private void handleRefresh() {
if (!this.refresh)
return;
XMLModelNotifier notifier = getModelNotifier();
boolean isChanging = notifier.isChanging();
if (!isChanging)
notifier.beginChanging(true);
XMLModelParser parser = getModelParser();
setActive(parser);
this.document.removeChildNodes()... |
Inversion-Mutation | megadiff | "public void refresh(Attack attack){
setButtonsStatus();
Collection<Integer> temp=attack.getaDiceResults();
String tempS="";
for(Integer i: temp){
tempS+=i+";";
}
if(tempS.endsWith(";")) tempS.substring(0, tempS.length()-1);
thrownAttacker.setT... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "refresh" | "public void refresh(Attack attack){
setButtonsStatus();
Collection<Integer> temp=attack.getaDiceResults();
String tempS="";
for(Integer i: temp){
tempS+=i+";";
}
if(tempS.endsWith(";")) tempS.substring(0, tempS.length()-1);
tempS="";
... |
Inversion-Mutation | megadiff | "public void setIgnoreList(String player, String reciever){
List<String> recievers=new ArrayList<String>();
if(ignoreList.size()>=1){
recievers= ignoreList.get(player);
recievers.add(reciever);
ignoreList.clear();
ignoreList.put(player, recievers);
Bukkit.getPlayerExact(player... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setIgnoreList" | "public void setIgnoreList(String player, String reciever){
List<String> recievers=new ArrayList<String>();
if(ignoreList.size()>=1){
recievers= ignoreList.get(player);
<MASK>ignoreList.clear();</MASK>
recievers.add(reciever);
ignoreList.put(player, recievers);
Bukkit.getPlaye... |
Inversion-Mutation | megadiff | "public void createMessage(User currentUser, MessageParser mp, String groupId)
throws IOException, MessagingException {
ParseObject parseMessage = new ParseObject(MESSAGES_SCHEMA);
parseMessage.put("message_id", mp.getMessageId());
parseMessage.put("user_id", currentUser.objectId);
parseMessage.put("gro... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createMessage" | "public void createMessage(User currentUser, MessageParser mp, String groupId)
throws IOException, MessagingException {
ParseObject parseMessage = new ParseObject(MESSAGES_SCHEMA);
parseMessage.put("message_id", mp.getMessageId());
parseMessage.put("user_id", currentUser.objectId);
parseMessage.put("gro... |
Inversion-Mutation | megadiff | "@Override
public void loadAsync (AssetManager manager, String fileName, FileHandle file, TextureParameter parameter) {
info.filename = fileName;
if (parameter == null || parameter.textureData == null) {
Pixmap pixmap = null;
Format format = null;
boolean genMipMaps = false;
info.texture = null;... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "loadAsync" | "@Override
public void loadAsync (AssetManager manager, String fileName, FileHandle file, TextureParameter parameter) {
info.filename = fileName;
if (parameter == null || parameter.textureData == null) {
Pixmap pixmap = null;
Format format = null;
boolean genMipMaps = false;
info.texture = null;... |
Inversion-Mutation | megadiff | "protected void registerContextMenu() {
MenuManager contextMenu = new MenuManager();
createContextMenu(contextMenu);
contextMenu.add(new GroupMarker(
IWorkbenchActionConstants.MB_ADDITIONS));
Control control = getTreeViewer().getControl();
Menu menu = conte... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "registerContextMenu" | "protected void registerContextMenu() {
MenuManager contextMenu = new MenuManager();
createContextMenu(contextMenu);
contextMenu.add(new GroupMarker(
IWorkbenchActionConstants.MB_ADDITIONS));
<MASK>getSite().registerContextMenu(contextMenu, getTreeViewer());</MASK>
... |
Inversion-Mutation | megadiff | "@Override
public boolean nextKeyValue() throws IOException, InterruptedException {
if (tupleQueue.size() > 0) {
tuple = tupleQueue.remove(0);
return true;
}
try {
// keep going until the decoder says it found a good one.
PcapPa... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "nextKeyValue" | "@Override
public boolean nextKeyValue() throws IOException, InterruptedException {
if (tupleQueue.size() > 0) {
tuple = tupleQueue.remove(0);
return true;
}
try {
// keep going until the decoder says it found a good one.
PcapPa... |
Inversion-Mutation | megadiff | "@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
switch (position) {
case 0:// Timeline
getActionBar().setTitle("Timeline");
new GetNewsAsyncTask(MainActivity.this).execute();
cleanBackStack();
break;
case 1:// Profile
setTitle("Profil... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onItemClick" | "@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
switch (position) {
case 0:// Timeline
getActionBar().setTitle("Timeline");
new GetNewsAsyncTask(MainActivity.this).execute();
<MASK>cleanBackStack();</MASK>
break;
case 1:// Profile
set... |
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 | "private void initVariables() {
config = this.getConfig();
itemFile = new File(this.getDataFolder() + File.separator + "items.csv");
preview = new PreviewCommand(this);
new PreviewListener(this);
server = Bukkit.getServer();
undo = new HashMap<String, ClearUndoHolder>();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "initVariables" | "private void initVariables() {
config = this.getConfig();
itemFile = new File(this.getDataFolder() + File.separator + "items.csv");
new PreviewListener(this);
server = Bukkit.getServer();
<MASK>preview = new PreviewCommand(this);</MASK>
undo = new HashMap<String, ClearUndoHolder>();
}" |
Inversion-Mutation | megadiff | "public void moveEditWindow(GraphicsConfiguration gc) {
if (TopLevel.isMDIMode()) return; // only valid in SDI mode
jf.setVisible(false); // hide old Frame
//jf.getFocusOwner().setFocusable(false);
//System.out.println("Set unfocasable: "+jf.getFocusOwner());
depopulateJ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "moveEditWindow" | "public void moveEditWindow(GraphicsConfiguration gc) {
if (TopLevel.isMDIMode()) return; // only valid in SDI mode
jf.setVisible(false); // hide old Frame
//jf.getFocusOwner().setFocusable(false);
//System.out.println("Set unfocasable: "+jf.getFocusOwner());
depopulateJ... |
Inversion-Mutation | megadiff | "private void updateScreenshot(Tab tab) {
// If this is a bookmarked site, add a screenshot to the database.
// FIXME: Would like to make sure there is actually something to
// draw, but the API for that (WebViewCore.pictureReady()) is not
// currently accessible here.
Web... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "updateScreenshot" | "private void updateScreenshot(Tab tab) {
// If this is a bookmarked site, add a screenshot to the database.
// FIXME: Would like to make sure there is actually something to
// draw, but the API for that (WebViewCore.pictureReady()) is not
// currently accessible here.
Web... |
Inversion-Mutation | megadiff | "@Override
protected Void doInBackground(Void... unused) {
Cursor cursor = null;
try {
// TODO: Clean this up
cursor = Bookmarks.queryCombinedForUrl(cr, originalUrl, url);
if (cursor != null && cursor.moveToFir... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doInBackground" | "@Override
protected Void doInBackground(Void... unused) {
Cursor cursor = null;
try {
// TODO: Clean this up
cursor = Bookmarks.queryCombinedForUrl(cr, originalUrl, url);
if (cursor != null && cursor.moveToFir... |
Inversion-Mutation | megadiff | "public static UILink make(UIContainer parent, String ID, String text, String target) {
UILink togo = new UILink();
togo.ID = ID;
togo.target = new UIOutput();
if (target != null) {
togo.target.setValue(target);
}
if (text != null) {
togo.linktext = new UIOutput();
to... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "make" | "public static UILink make(UIContainer parent, String ID, String text, String target) {
UILink togo = new UILink();
togo.ID = ID;
togo.target = new UIOutput();
if (target != null) {
togo.target.setValue(target);
}
<MASK>togo.linktext = new UIOutput();</MASK>
if (text != null) {... |
Inversion-Mutation | megadiff | "public void connectWithRef(final String url, final int connCount, Object ref) throws NotifyRemotingException {
final Set<Object> refs = this.getReferences(url);
synchronized (refs) {
this.remotingClient.connect(url, connCount);
refs.add(ref);
}
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "connectWithRef" | "public void connectWithRef(final String url, final int connCount, Object ref) throws NotifyRemotingException {
final Set<Object> refs = this.getReferences(url);
<MASK>this.remotingClient.connect(url, connCount);</MASK>
synchronized (refs) {
refs.add(ref);
}
}" |
Inversion-Mutation | megadiff | "public @Nonnull Org authenticate(boolean force) throws CloudException, InternalException {
Cache<Org> cache = Cache.getInstance(provider, "vCloudOrgs", Org.class, CacheLevel.CLOUD_ACCOUNT, new TimePeriod<Minute>(25, TimePeriod.MINUTE));
ProviderContext ctx = provider.getContext();
if( ctx ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "authenticate" | "public @Nonnull Org authenticate(boolean force) throws CloudException, InternalException {
Cache<Org> cache = Cache.getInstance(provider, "vCloudOrgs", Org.class, CacheLevel.CLOUD_ACCOUNT, new TimePeriod<Minute>(25, TimePeriod.MINUTE));
ProviderContext ctx = provider.getContext();
if( ctx ... |
Inversion-Mutation | megadiff | "private void runPipeline() throws Exception {
String uuid = null;
while ((uuid = waitForInput()) != null) {
TransformedGraphImpl transformedGraphImpl = null;
try {
LOG.info(String.format("PipelineService starts processing graph %s", uuid));
int pipelineId = _workingInputGraphStatus.getGraph... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "runPipeline" | "private void runPipeline() throws Exception {
<MASK>TransformedGraphImpl transformedGraphImpl = null;</MASK>
String uuid = null;
while ((uuid = waitForInput()) != null) {
try {
LOG.info(String.format("PipelineService starts processing graph %s", uuid));
int pipelineId = _workingInputGraphSt... |
Inversion-Mutation | megadiff | "protected void performApply() {
if (proxyService == null)
return;
boolean proxiesEnabled = manualProxyConfigurationButton.getSelection();
// Save the contents of the text fields to the proxy data.
IProxyData[] proxyData = new IProxyData[entryList.length];
for (int index = 0; index < entryList.leng... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "performApply" | "protected void performApply() {
if (proxyService == null)
return;
boolean proxiesEnabled = manualProxyConfigurationButton.getSelection();
// Save the contents of the text fields to the proxy data.
IProxyData[] proxyData = new IProxyData[entryList.length];
for (int index = 0; index < entryList.leng... |
Inversion-Mutation | megadiff | "public int main(List<String> args, Locale locale, InputStream stdin, PrintStream stdout, PrintStream stderr) {
this.stdin = new BufferedInputStream(stdin);
this.stdout = stdout;
this.stderr = stderr;
this.locale = locale;
this.channel = Channel.current();
registerO... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "main" | "public int main(List<String> args, Locale locale, InputStream stdin, PrintStream stdout, PrintStream stderr) {
this.stdin = new BufferedInputStream(stdin);
this.stdout = stdout;
this.stderr = stderr;
this.locale = locale;
this.channel = Channel.current();
registerO... |
Inversion-Mutation | megadiff | "public void onEnable() {
prisonSuite = PrisonSuite.addPlugin(this);
getConfig().options().copyDefaults(true);
saveConfig();
settings = new Settings(this);
Message.debug("1. Established connection with PrisonCore");
getLanguageData().options().copyDefaults(true);
saveLanguageData();
langu... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onEnable" | "public void onEnable() {
prisonSuite = PrisonSuite.addPlugin(this);
<MASK>Message.debug("1. Established connection with PrisonCore");</MASK>
getConfig().options().copyDefaults(true);
saveConfig();
settings = new Settings(this);
getLanguageData().options().copyDefaults(true);
saveLanguageDat... |
Inversion-Mutation | megadiff | "public Connection(Socket cSocket) {
clientSocket = cSocket;
shutDown = false;
try {
outStream = new ObjectOutputStream(cSocket.getOutputStream());
inStream = new ObjectInputStream(cSocket.getInputStream());
} catch (IOException ie) {
}
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "Connection" | "public Connection(Socket cSocket) {
clientSocket = cSocket;
shutDown = false;
try {
inStream = new ObjectInputStream(cSocket.getInputStream());
<MASK>outStream = new ObjectOutputStream(cSocket.getOutputStream());</MASK>
} catch (IOException ie) {
... |
Inversion-Mutation | megadiff | "@Override
public void run() {
LogQueryCommand cmd = null;
try {
cmd = subQuery.get(subQuery.size() - 1);
for (int i = subQuery.size() - 1; i >= 0; i--)
subQuery.get(i).start();
subQuery.get(0).eof(false);
try {
subQueryResultSet = subQueryResult.getResult();
logger... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "@Override
public void run() {
LogQueryCommand cmd = null;
try {
for (int i = subQuery.size() - 1; i >= 0; i--)
subQuery.get(i).start();
subQuery.get(0).eof(false);
<MASK>cmd = subQuery.get(subQuery.size() - 1);</MASK>
try {
subQueryResultSet = subQueryResult.getResult();... |
Inversion-Mutation | megadiff | "@Override
public void execute(LogOutUICommand command) throws FatalException {
Service service = serviceRegistry.getCurrentService();
IPlayer currentPlayer = serviceRegistry.getPlayer(service);
if (currentPlayer != null) {
try {
dispatcher.dispatch(new SendMessageToUserCommand("Zegnaj, "
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "execute" | "@Override
public void execute(LogOutUICommand command) throws FatalException {
Service service = serviceRegistry.getCurrentService();
IPlayer currentPlayer = serviceRegistry.getPlayer(service);
if (currentPlayer != null) {
try {
<MASK>dispatcher.dispatch(new LogOutCommand());</MASK>
dispatch... |
Inversion-Mutation | megadiff | "public List<TransmissionQbf> splitQbf(int n, Heuristic h) {
TransmissionQbf tmp;
for (int i = 0; i < n; i++) {
qbfResults.add(i, false);
resultAvailable.add(i, false);
resultProcessed.add(i, false);
tmp = new TransmissionQbf();
tmp.setId((new Integer(id * 1000 + i)).toString());
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "splitQbf" | "public List<TransmissionQbf> splitQbf(int n, Heuristic h) {
TransmissionQbf tmp;
for (int i = 0; i < n; i++) {
qbfResults.add(i, false);
resultAvailable.add(i, false);
resultProcessed.add(i, false);
tmp = new TransmissionQbf();
tmp.setId((new Integer(id * 1000 + i)).toString());
... |
Inversion-Mutation | megadiff | "protected void onPostExecute(Void unused) {
Dialog.dismiss();
if (Error != null) {
Toast.makeText(ZeitGeistReichActivity.this, Error, Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(ZeitGeistReichActivity.this, "Image uploaded.", Toast.LENGTH_SHORT).show();
}
finish();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onPostExecute" | "protected void onPostExecute(Void unused) {
Dialog.dismiss();
if (Error != null) {
Toast.makeText(ZeitGeistReichActivity.this, Error, Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(ZeitGeistReichActivity.this, "Image uploaded.", Toast.LENGTH_SHORT).show();
<MASK>finish();</MASK>
}
... |
Inversion-Mutation | megadiff | "public static void initDimension(int dim) {
WorldServer overworld = getWorld(0);
if (overworld == null) {
throw new RuntimeException("Cannot Hotload Dim: Overworld is not Loaded!");
}
try {
DimensionManager.getProviderType(dim);
} catch (Exception ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "initDimension" | "public static void initDimension(int dim) {
WorldServer overworld = getWorld(0);
if (overworld == null) {
throw new RuntimeException("Cannot Hotload Dim: Overworld is not Loaded!");
}
try {
DimensionManager.getProviderType(dim);
} catch (Exception ... |
Inversion-Mutation | megadiff | "public void setStatement(final PreparedStatement statement) {
closeStatement();
LOG.debug("setting new prepared statement");
this.statement = statement;
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setStatement" | "public void setStatement(final PreparedStatement statement) {
LOG.debug("setting new prepared statement");
<MASK>closeStatement();</MASK>
this.statement = statement;
}" |
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 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 setBody(Body body) throws MessagingException
{
this.mBody = body;
setHeader("MIME-Version", "1.0");
if (body instanceof com.fsck.k9.mail.Multipart)
{
com.fsck.k9.mail.Multipart multipart = ((com.fsck.k9.mail.Multipart)body);
multipart.setPa... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setBody" | "public void setBody(Body body) throws MessagingException
{
this.mBody = body;
if (body instanceof com.fsck.k9.mail.Multipart)
{
com.fsck.k9.mail.Multipart multipart = ((com.fsck.k9.mail.Multipart)body);
multipart.setParent(this);
setHeader(MimeHea... |
Inversion-Mutation | megadiff | "@Override
public View onCreateView(final LayoutInflater inflater, final ViewGroup container, final Bundle savedInstanceState) {
getDialog().setTitle(R.string.dialog_add_title);
final View view = inflater.inflate(R.layout.dialog_new_download, container, false);
editDownloadUrl = (Edi... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onCreateView" | "@Override
public View onCreateView(final LayoutInflater inflater, final ViewGroup container, final Bundle savedInstanceState) {
getDialog().setTitle(R.string.dialog_add_title);
final View view = inflater.inflate(R.layout.dialog_new_download, container, false);
editDownloadUrl = (Edi... |
Inversion-Mutation | megadiff | "@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = false)
public void onBlockBreakLowest(final BlockBreakEvent event){
checkStack();
if (!stack.isEmpty()){
final Player player = event.getPlayer();
final StackEntry entry = stack.get(stack.size() - 1);
if (player.equals(entry.player)) ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onBlockBreakLowest" | "@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = false)
public void onBlockBreakLowest(final BlockBreakEvent event){
if (!stack.isEmpty()){
<MASK>checkStack();</MASK>
final Player player = event.getPlayer();
final StackEntry entry = stack.get(stack.size() - 1);
if (player.equals(e... |
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 | "private void localConnections(int netMap[]) {
// Exports
for (int k = 0; k < numExports; k++) {
ImmutableExport e = exports.get(k);
int portOffset = portOffsets[k];
Name expNm = e.name;
int busWidth = expNm.busWidth();
int drawn = dra... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "localConnections" | "private void localConnections(int netMap[]) {
// Exports
for (int k = 0; k < numExports; k++) {
ImmutableExport e = exports.get(k);
int portOffset = portOffsets[k];
Name expNm = e.name;
int busWidth = expNm.busWidth();
int drawn = dra... |
Inversion-Mutation | megadiff | "@Override
public void cleanupInstance() throws Exception
{
Details details = new Details(exhibitor);
if ( !details.isValid() )
{
return;
}
// see http://zookeeper.apache.org/doc/r3.3.3/zookeeperAdmin.html#Ongoing+Data+Directory+Cleanup
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "cleanupInstance" | "@Override
public void cleanupInstance() throws Exception
{
Details details = new Details(exhibitor);
if ( !details.isValid() )
{
return;
}
// see http://zookeeper.apache.org/doc/r3.3.3/zookeeperAdmin.html#Ongoing+Data+Directory+Cleanup
... |
Inversion-Mutation | megadiff | "@Override
protected void onCreate(Bundle savedInstanceState) { //On Activity Create
super.onCreate(savedInstanceState); //Invoke Superclass (Activity)'s onCreate() method.
setContentView(R.layout.activity_main); //Set view.
Button b = (Button) findViewById(R.id.b); //Basic test button
Button m = (B... | 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) { //On Activity Create
super.onCreate(savedInstanceState); //Invoke Superclass (Activity)'s onCreate() method.
setContentView(R.layout.activity_main); //Set view.
Button b = (Button) findViewById(R.id.b); //Basic test button
Button m = (B... |
Inversion-Mutation | megadiff | "@Override
public void onClick(View v){ //Interrupt all threads
ThreadPool.t[0].interrupt();
ThreadPool.t[1].interrupt();
ThreadPool.t[2].interrupt();
ThreadPool.emptyit(0); //Empty all threads
}" | 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){ //Interrupt all threads
<MASK>ThreadPool.emptyit(0); //Empty all threads</MASK>
ThreadPool.t[0].interrupt();
ThreadPool.t[1].interrupt();
ThreadPool.t[2].interrupt();
}" |
Inversion-Mutation | megadiff | "public void onEnable() {
instance = this;
log = getLogger();
createLists();
SCPlayerListener = new SCPlayerListener(this);
pm = Bukkit.getServer().getPluginManager();
pm.registerEvents(SCPluginListener, this);
loadConfigurationFile();
loadConfig(config);
SCPluginListener.spoutHook(pm);
i... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onEnable" | "public void onEnable() {
instance = this;
log = getLogger();
createLists();
SCPlayerListener = new SCPlayerListener(this);
pm = Bukkit.getServer().getPluginManager();
<MASK>pm.registerEvents(SCPlayerListener, this);</MASK>
pm.registerEvents(SCPluginListener, this);
loadConfigurationFile();
l... |
Inversion-Mutation | megadiff | "@SuppressWarnings("unchecked")
public Configuration(Configuration other) {
this.resources = (ArrayList<Resource>) other.resources.clone();
synchronized(other) {
if (other.properties != null) {
this.properties = (Properties)other.properties.clone();
}
if (other.overlay!=null) {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "Configuration" | "@SuppressWarnings("unchecked")
public Configuration(Configuration other) {
this.resources = (ArrayList<Resource>) other.resources.clone();
synchronized(other) {
if (other.properties != null) {
this.properties = (Properties)other.properties.clone();
}
if (other.overlay!=null) {
... |
Inversion-Mutation | megadiff | "private void check(){
File[] files = _deployDir.listFiles(_fileFilter);
// Checking for new deployment directories
for (File file : files) {
if (checkIsNew(new File(file, "deploy.xml"))) {
try {
DeploymentUnit du = new DeploymentUnit(file, _pxeServer);
du.deploy(... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "check" | "private void check(){
File[] files = _deployDir.listFiles(_fileFilter);
// Checking for new deployment directories
for (File file : files) {
if (checkIsNew(new File(file, "deploy.xml"))) {
try {
DeploymentUnit du = new DeploymentUnit(file, _pxeServer);
<MASK>_insp... |
Inversion-Mutation | megadiff | "@Override
public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException {
Components.generateIdIfNotSpecified(component);
ResponseWriter writer = facesContext.getResponseWriter();
Chart chart = (Chart) component;
ChartView view = chart.getChartVie... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "encodeEnd" | "@Override
public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException {
Components.generateIdIfNotSpecified(component);
ResponseWriter writer = facesContext.getResponseWriter();
Chart chart = (Chart) component;
ChartView view = chart.getChartVie... |
Inversion-Mutation | megadiff | "public Iterable<AnnotatedToken> annotated() {
return new Iterable<AnnotatedToken>() {
public Iterator<AnnotatedToken> iterator() {
final PeekingIterator<Behavior> starting =
peekingIterator(CompareLow.sortedCopy(behaviors).iterator());
final PeekingIterator<Behavior> ending =
peekingItera... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "annotated" | "public Iterable<AnnotatedToken> annotated() {
return new Iterable<AnnotatedToken>() {
public Iterator<AnnotatedToken> iterator() {
final PeekingIterator<Behavior> starting =
peekingIterator(CompareLow.sortedCopy(behaviors).iterator());
final PeekingIterator<Behavior> ending =
peekingItera... |
Inversion-Mutation | megadiff | "public Iterator<AnnotatedToken> iterator() {
final PeekingIterator<Behavior> starting =
peekingIterator(CompareLow.sortedCopy(behaviors).iterator());
final PeekingIterator<Behavior> ending =
peekingIterator(CompareHigh.sortedCopy(behaviors).iterator());
return new AbstractIterator<Annotated... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "iterator" | "public Iterator<AnnotatedToken> iterator() {
final PeekingIterator<Behavior> starting =
peekingIterator(CompareLow.sortedCopy(behaviors).iterator());
final PeekingIterator<Behavior> ending =
peekingIterator(CompareHigh.sortedCopy(behaviors).iterator());
return new AbstractIterator<Annotated... |
Inversion-Mutation | megadiff | "protected AnnotatedToken computeNext() {
if (n > tokens.size())
return endOfData();
Token t = (n==tokens.size()) ? null : tokens.get(n);
List<Behavior> tStarting = Lists.newArrayList();
while (starting.hasNext() && starting.peek().low()<=n)
tStarting.add(starting.next());
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "computeNext" | "protected AnnotatedToken computeNext() {
if (n > tokens.size())
return endOfData();
Token t = (n==tokens.size()) ? null : tokens.get(n);
<MASK>n++;</MASK>
List<Behavior> tStarting = Lists.newArrayList();
while (starting.hasNext() && starting.peek().low()<=n)
tStarting... |
Inversion-Mutation | megadiff | "private DocumentModel createCommentDocModel(DocumentModel docModel,
DocumentModel comment) throws ClientException {
updateAuthor(docModel, comment);
String[] pathList = getCommentPathList(comment);
String domainPath = docModel.getPath().segment(0);
CoreSession myS... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createCommentDocModel" | "private DocumentModel createCommentDocModel(DocumentModel docModel,
DocumentModel comment) throws ClientException {
updateAuthor(docModel, comment);
String[] pathList = getCommentPathList(comment);
String domainPath = docModel.getPath().segment(0);
CoreSession myS... |
Inversion-Mutation | megadiff | "@BeforeClass
public static void setUpClass() throws BridgeDBException, VoidValidatorException {
ConfigReader.useTest();
TestSqlFactory.checkSQLAccess();
uriListener = SQLUriMapper.createNew();
instance = new Loader();
reader = RdfFactory.getTestFilebase();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setUpClass" | "@BeforeClass
public static void setUpClass() throws BridgeDBException, VoidValidatorException {
ConfigReader.useTest();
TestSqlFactory.checkSQLAccess();
<MASK>instance = new Loader();</MASK>
uriListener = SQLUriMapper.createNew();
reader = RdfFactory.getTestFilebase()... |
Inversion-Mutation | megadiff | "@MotechListener(subjects = {MESSAGE_CAMPAIGN_FIRED_EVENT_SUBJECT})
public void sendProgramMessage(MotechEvent event) {
try {
Map params = event.getParameters();
String patientId = (String) params.get(EventKeys.EXTERNAL_ID_KEY);
LocalDate campaignStartDate = (LocalDa... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "sendProgramMessage" | "@MotechListener(subjects = {MESSAGE_CAMPAIGN_FIRED_EVENT_SUBJECT})
public void sendProgramMessage(MotechEvent event) {
try {
Map params = event.getParameters();
String patientId = (String) params.get(EventKeys.EXTERNAL_ID_KEY);
LocalDate campaignStartDate = (LocalDa... |
Inversion-Mutation | megadiff | "private Optional<FileInfo> getNextFile() {
/* Filter to exclude finished or hidden files */
FileFilter filter = new FileFilter() {
public boolean accept(File candidate) {
String fileName = candidate.getName();
if ((candidate.isDirectory()) ||
(fileName.endsWith(completed... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getNextFile" | "private Optional<FileInfo> getNextFile() {
/* Filter to exclude finished or hidden files */
FileFilter filter = new FileFilter() {
public boolean accept(File candidate) {
String fileName = candidate.getName();
if ((candidate.isDirectory()) ||
(fileName.endsWith(completed... |
Inversion-Mutation | megadiff | "private RestResponse convertLocaleToResponse(
List<SurveyedLocale> localeList, Boolean needDetailsFlag,
String cursor, String oldCursor, String display) {
PlacemarkRestResponse resp = new PlacemarkRestResponse();
if (needDetailsFlag == null) {
needDetailsFlag = true;
}
if (localeList != null) {... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "convertLocaleToResponse" | "private RestResponse convertLocaleToResponse(
List<SurveyedLocale> localeList, Boolean needDetailsFlag,
String cursor, String oldCursor, String display) {
PlacemarkRestResponse resp = new PlacemarkRestResponse();
if (needDetailsFlag == null) {
needDetailsFlag = true;
}
if (localeList != null) {... |
Inversion-Mutation | megadiff | "private CommandBar createInteractionsToolBar() {
final CommandBar toolBar = createToolBar(INTERACTIONS_TOOL_BAR_ID, "Interactions");
addCommandsToToolBar(toolBar, new String[]{
// These IDs are defined in the module.xml
"selectTool",
// todo - reactivate range-finde... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createInteractionsToolBar" | "private CommandBar createInteractionsToolBar() {
final CommandBar toolBar = createToolBar(INTERACTIONS_TOOL_BAR_ID, "Interactions");
addCommandsToToolBar(toolBar, new String[]{
// These IDs are defined in the module.xml
"selectTool",
// todo - reactivate range-finde... |
Inversion-Mutation | megadiff | "private static void updateIO(File f, Stint s){
try {
PrintWriter pw=new PrintWriter(f);
Scanner sc=new Scanner(f);
scanners.put(s.toString(),sc);
printers.put(s.toString(),pw);
} catch (FileNotFoundException e) {
e.printStackTrace();
exception("Stint: IO Exception");
}
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "updateIO" | "private static void updateIO(File f, Stint s){
try {
<MASK>Scanner sc=new Scanner(f);</MASK>
PrintWriter pw=new PrintWriter(f);
scanners.put(s.toString(),sc);
printers.put(s.toString(),pw);
} catch (FileNotFoundException e) {
e.printStackTrace();
exception("Stint: IO Exception");
}
... |
Inversion-Mutation | megadiff | "public static String membersListMessage(Collection<BaseGuildMemberType> members){
StringBuilder sb = new StringBuilder(4 + 15 * members.size()).append("gIM+");
boolean first = true;
for (BaseGuildMemberType member : members) {
if (first) first = false;
else sb.app... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "membersListMessage" | "public static String membersListMessage(Collection<BaseGuildMemberType> members){
StringBuilder sb = new StringBuilder(4 + 15 * members.size()).append("gIM+");
boolean first = true;
for (BaseGuildMemberType member : members) {
if (first) first = false;
else sb.app... |
Inversion-Mutation | megadiff | "protected String normalizeValue(String key, String value) throws PgkbException {
boolean valid = true;
String normalizedValue;
ExtendedEnum enumValue;
if (IcpcUtils.isBlank(value)) {
return IcpcUtils.NA;
}
String strippedValue = StringUtils.stripToNull(value);
normalizedVa... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "normalizeValue" | "protected String normalizeValue(String key, String value) throws PgkbException {
boolean valid = true;
String normalizedValue;
ExtendedEnum enumValue;
if (IcpcUtils.isBlank(value)) {
return IcpcUtils.NA;
}
String strippedValue = StringUtils.stripToNull(value);
normalizedVa... |
Inversion-Mutation | megadiff | "public void main(String[] args) throws Exception {
FiniteAlphabet alp = null;
//Motif[] mot = MotifIOTools.loadMotifSetXML(motifFiles);
List<SymbolList> allSymLists = new ArrayList<SymbolList>();
for (InputStream seqStream : seqFiles) {
SequenceDB seqDB;
if (type.equals("DNA")) {
alp = DN... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "main" | "public void main(String[] args) throws Exception {
FiniteAlphabet alp = null;
//Motif[] mot = MotifIOTools.loadMotifSetXML(motifFiles);
List<SymbolList> allSymLists = new ArrayList<SymbolList>();
for (InputStream seqStream : seqFiles) {
SequenceDB seqDB;
if (type.equals("DNA")) {
alp = DN... |
Inversion-Mutation | megadiff | "@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (args.length < 1) {
sender.sendMessage(ChatColor.RED + "Ya need to type something after it :P");
return false;
}
if (!(sender instanceof Player)) {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onCommand" | "@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (args.length < 1) {
sender.sendMessage(ChatColor.RED + "Ya need to type something after it :P");
return false;
}
if (!(sender instanceof Player)) {
... |
Inversion-Mutation | megadiff | "private void saveToRecorder(ProcessorURI curi,
Socket socket, Recorder recorder)
throws IOException, InterruptedException {
recorder.inputWrap(socket.getInputStream());
recorder.outputWrap(socket.getOutputStream());
recorder.markContentBegin();
// Read the remo... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "saveToRecorder" | "private void saveToRecorder(ProcessorURI curi,
Socket socket, Recorder recorder)
throws IOException, InterruptedException {
<MASK>recorder.markContentBegin();</MASK>
recorder.inputWrap(socket.getInputStream());
recorder.outputWrap(socket.getOutputStream());
// ... |
Inversion-Mutation | megadiff | "@Override
public void createControl(Composite parent, final FormToolkit toolkit) {
initialize();
selectionProvider = new SelectionProviderAdapter();
actionGroup = new CommentActionGroup();
MenuManager menuManager = new MenuManager();
menuManager.setRemoveAllWhenShown(true);
menuManager.addMenuL... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createControl" | "@Override
public void createControl(Composite parent, final FormToolkit toolkit) {
initialize();
selectionProvider = new SelectionProviderAdapter();
actionGroup = new CommentActionGroup();
MenuManager menuManager = new MenuManager();
menuManager.setRemoveAllWhenShown(true);
menuManager.addMenuL... |
Inversion-Mutation | megadiff | "public void menuAboutToShow(IMenuManager manager) {
// get comment and add reply action as first item in the menu
ISelection selection = selectionProvider.getSelection();
if (selection instanceof IStructuredSelection && !selection.isEmpty()) {
Object element = ((IStructuredSelection) selection).ge... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "menuAboutToShow" | "public void menuAboutToShow(IMenuManager manager) {
// get comment and add reply action as first item in the menu
ISelection selection = selectionProvider.getSelection();
if (selection instanceof IStructuredSelection && !selection.isEmpty()) {
Object element = ((IStructuredSelection) selection).ge... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.