nus-yam/ex-repair huggingface dataset:
Buggy code:
public class EclipseWorld extends World { public static boolean DEBUG = false ; public AjBuildManager buildManager ; private LookupEnvironment lookupEnvironment ; private Map addedTypeBindings = new HashMap ( ) ; public static EclipseWorld forLookupEnvironment ( LookupEnvironment env ) { } public static EclipseWorld fromScopeLookupEnvironment ( Scope scope ) { } public EclipseWorld ( LookupEnvironment lookupEnvironment , IMessageHandler handler ) { } public Advice concreteAdvice ( AdviceKind kind , Pointcut p , Member m , int extraMods , int start , int end , ISourceContext context ) { } public ConcreteTypeMunger concreteTypeMunger ( ResolvedTypeMunger munger , ResolvedTypeX aspectType ) { } protected ResolvedTypeX resolveObjectType ( TypeX ty ) { } public ResolvedTypeX fromEclipse ( ReferenceBinding binding ) { } public ResolvedTypeX [ ] fromEclipse ( ReferenceBinding [ ] bindings ) { } private static String getName ( TypeBinding binding ) { } public static TypeX fromBinding ( TypeBinding binding ) { } public static TypeX [ ] fromBindings ( TypeBinding [ ] bindings ) { } public static AstNode astForLocation ( IHasPosition location ) { } public Collection getTypeMungers ( ) { } public static ResolvedMember makeResolvedMember ( MethodBinding binding ) { <START_BUG> return new ResolvedMember ( Member . METHOD , EclipseWorld . fromBinding ( binding . declaringClass ) , binding . modifiers , EclipseWorld . fromBinding ( binding . returnType ) , new String ( binding . selector ) , EclipseWorld . fromBindings ( binding . parameters ) ) ; <END_BUG> } public static ResolvedMember makeResolvedMember ( FieldBinding binding ) { } public TypeBinding makeTypeBinding ( TypeX typeX ) { } public TypeBinding [ ] makeTypeBindings ( TypeX [ ] types ) { } public FieldBinding makeFieldBinding ( ResolvedMember member ) { } public MethodBinding makeMethodBinding ( ResolvedMember member ) { } public MethodBinding makeMethodBindingForCall ( Member member ) { } public void finishedCompilationUnit ( CompilationUnitDeclaration unit ) { } public void addTypeBinding ( TypeBinding binding ) { } public Shadow makeShadow ( AstNode location , ReferenceContext context ) { } public Shadow makeShadow ( ReferenceContext context ) { } }

Fix:
return new ResolvedMember ( ( binding . isConstructor ( ) ? Member . CONSTRUCTOR : Member . METHOD ) , EclipseWorld . fromBinding ( binding . declaringClass ) , binding . modifiers , EclipseWorld . fromBinding ( binding . returnType ) , new String ( binding . selector ) , EclipseWorld . fromBindings ( binding . parameters ) ) ;
Buggy code:
public interface RequiresCallback { <START_BUG> void require ( String id ) ; <END_BUG> }

Fix:
RequiresCallback require ( String id ) ;
Buggy code:
public abstract class OrientGraphRemoteTest extends OrientGraphTest { private static final String serverPort = System . getProperty ( "orient.server.port" , "3080" ) ; private static OServer server ; private static String oldOrientDBHome ; private static String serverHome ; private Map < String , OrientGraphFactory > graphFactories = new HashMap < String , OrientGraphFactory > ( ) ; @ BeforeClass public static void startEmbeddedServer ( ) throws Exception { } @ AfterClass public static void stopEmbeddedServer ( ) throws Exception { } public Graph generateGraph ( final String graphDirectoryName ) { } @ Override public void dropGraph ( final String graphDirectoryName ) { try { final String url = ( ( "remote:localhost:" + ( OrientGraphRemoteTest . serverPort ) ) + "//" ) + graphDirectoryName ; final OrientGraph graph = currentGraphs . get ( url ) ; <START_BUG> if ( graph != null ) <END_BUG> graph . shutdown ( ) ; final OrientGraphFactory factory = graphFactories . remove ( url ) ; if ( factory != null ) factory . close ( ) ; final OServerAdmin serverAdmin = new OServerAdmin ( url ) ; serverAdmin . connect ( "root" , "root" ) ; if ( serverAdmin . existsDatabase ( OrientGraphTest . getStorageType ( ) ) ) serverAdmin . dropDatabase ( OrientGraphTest . getStorageType ( ) ) ; serverAdmin . close ( ) ; } catch ( Exception e ) { throw new IllegalStateException ( e ) ; } } @ Override public void doTestSuite ( final TestSuite testSuite ) throws Exception { } @ Test @ Ignore @ Override public void testIndexableGraphTestSuite ( ) throws Exception { } @ Test @ Ignore @ Override public void testIndexTestSuite ( ) throws Exception { } @ Test @ Ignore @ Override public void testKeyIndexableGraphTestSuite ( ) throws Exception { } }

Fix:
if ( ( graph != null ) && ( ! ( graph . isClosed ( ) ) ) )
Buggy code:
public abstract class SingleEMTestCase extends SingleEMFTestCase { protected OpenJPAEntityManager em ; @ Override public void setUp ( Object ... props ) { } @ Override public void tearDown ( ) { } protected boolean begin ( ) { } protected boolean commit ( ) { } protected boolean rollback ( ) { EntityTransaction tx = em . getTransaction ( ) ; if ( ! ( tx . isActive ( ) ) ) return false ; <START_BUG> tx . commit ( ) ; <END_BUG> return true ; } protected boolean close ( ) { } protected void remove ( Object ... obs ) { } protected void persist ( Object ... obs ) { } protected OpenJPAQuery query ( String str ) { } protected OpenJPAQuery query ( Class c , String str , Object ... params ) { } protected < E > List < E > find ( Class < E > c , String q , Object ... params ) { } protected < E > List < E > find ( Class < E > c ) { } }

Fix:
tx . rollback ( ) ;
Buggy code:
public class PackageTest extends JMeterTestCase { private Map < String , String > variables ; private SampleResult result ; private ReplaceStringWithFunctions transformer ; public PackageTest ( String arg0 ) { } private JMeterContext jmctx = null ; @ Override public void setUp ( ) { jmctx = JMeterContextService . getContext ( ) ; variables = new HashMap < String , String > ( ) ; variables . put ( "my_regex" , ".*" ) ; variables . put ( "server" , "jakarta.apache.org" ) ; result = new SampleResult ( ) ; <START_BUG> result . setResponseData ( "<html>hello<seq2seq4repair_space>world<//html><seq2seq4repair_space>costs:<seq2seq4repair_space>$3.47,$5.67" . getBytes ( ) ) ; <END_BUG> transformer = new ReplaceStringWithFunctions ( new CompoundVariable ( ) , variables ) ; jmctx . setVariables ( new JMeterVariables ( ) ) ; jmctx . setSamplingStarted ( true ) ; jmctx . setPreviousResult ( result ) ; jmctx . getVariables ( ) . put ( "server" , "jakarta.apache.org" ) ; jmctx . getVariables ( ) . put ( "my_regex" , ".*" ) ; } public void testFunctionParse1 ( ) throws Exception { } public void testParseExample1 ( ) throws Exception { } public void testParseExample2 ( ) throws Exception { } public void testParseExample3 ( ) throws Exception { } public void testParseExample4 ( ) throws Exception { } public void testParseExample6 ( ) throws Exception { } public void testParseExample5 ( ) throws Exception { } public void testParseExample7 ( ) throws Exception { } public void testParseExample8 ( ) throws Exception { } public void testParseExample9 ( ) throws Exception { } public void testParseExample10 ( ) throws Exception { } public void testParseExample11 ( ) throws Exception { } public void testParseExample12 ( ) throws Exception { } public void testParseExample13 ( ) throws Exception { } public void testParseExample14 ( ) throws Exception { } public void testNestedExample1 ( ) throws Exception { } public void testNestedExample2 ( ) throws Exception { } }

Fix:
result . setResponseData ( "<html>hello<seq2seq4repair_space>world<//html><seq2seq4repair_space>costs:<seq2seq4repair_space>$3.47,$5.67" , null ) ;
Buggy code:
public final class StructureDriverProcessor implements DeploymentUnitProcessor { private static final Logger log = Logger . getLogger ( "org.jboss.as.connector.deployers.jdbc" ) ; @ Override public void deploy ( final DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; Boolean ignore = deploymentUnit . getAttachment ( IGNORE_OSGI ) ; if ( ( ignore != null ) && ( ignore . booleanValue ( ) ) ) { return ; } List < ResourceRoot > resourceRoots = DeploymentUtils . allResourceRoots ( deploymentUnit ) ; for ( ResourceRoot resourceRoot : resourceRoots ) { final VirtualFile deploymentRoot = resourceRoot . getRoot ( ) ; <START_BUG> if ( ( deploymentRoot . getChild ( "META-INF//services//java.sql.Driver" ) ) != null ) { <END_BUG> deploymentUnit . putAttachment ( IGNORE_OSGI , Boolean . TRUE ) ; break ; } } } @ Override public void undeploy ( final DeploymentUnit context ) { } }

Fix:
if ( deploymentRoot . getChild ( "META-INF//services//java.sql.Driver" ) . exists ( ) ) {
Buggy code:
public class BuildEventSupport implements DemuxOutputReceiver { private ArrayList listeners = new ArrayList ( ) ; private Map threadTasks = new HashMap ( ) ; public List getListeners ( ) { } public void addBuildListener ( BuildListener listener ) { } public void removeBuildListener ( BuildListener listener ) { } public void fireBuildStarted ( ModelElement element ) { } public void fireBuildFinished ( ModelElement element , Throwable cause ) { } public void fireTargetStarted ( ModelElement element ) { } public void fireTargetFinished ( ModelElement element , Throwable cause ) { } public void fireTaskStarted ( Task task ) { } public void fireTaskFinished ( Task task , Throwable cause ) { } public void fireMessageLogged ( Object source , String message , int priority ) { } public void threadOutput ( String line , boolean isError ) { Task task = ( ( Task ) ( threadTasks . get ( Thread . currentThread ( ) ) ) ) ; if ( task != null ) { try { if ( isError ) { task . handleSystemErr ( line ) ; } else { task . handleSystemOut ( line ) ; } return ; } catch ( AntException e ) { } } <START_BUG> fireMessageLogged ( this , line , ( isError ? MessageLevel . MSG_ERR : MessageLevel . MSG_INFO ) ) ; <END_BUG> } }

Fix:
fireMessageLogged ( this , line , ( isError ? MessageLevel . ERROR : MessageLevel . INFO ) ) ;
Buggy code:
@ ServerSetup ( LoggingProfilesTestCase . LoggingProfilesTestCaseSetup . class ) @ RunWith ( Arquillian . class ) public class LoggingProfilesTestCase extends AbstractLoggingTest { private static Logger log = Logger . getLogger ( LoggingProfilesTestCase . class ) ; @ ContainerResource private ManagementClient managementClient ; private static final String LOG_FILE_NAME = "profiles-test.log" ; private static final String PROFILE1_LOG_NAME = "dummy-profile1.log" ; private static final String PROFILE2_LOG_NAME = "dummy-profile2.log" ; private static final String CHANGED_LOG_NAME = "dummy-profile1-changed.log" ; private static File logFile ; private static File dummyLog1 ; private static File dummyLog2 ; private static File dummyLog1Changed ; static class LoggingProfilesTestCaseSetup extends AbstractMgmtServerSetupTask { @ Override protected void doSetup ( ManagementClient managementClient ) throws Exception { } @ Override public void tearDown ( ManagementClient managementClient , String containerId ) throws Exception { } } @ Deployment public static WebArchive createDeployment1 ( ) { } @ Deployment ( name = "Deployment2" ) public static WebArchive createDeployment2 ( ) { } @ RunAsClient @ Test @ InSequence ( 1 ) public void noWarningTest ( ) throws Exception { BufferedReader br = new BufferedReader ( new InputStreamReader ( new FileInputStream ( LoggingProfilesTestCase . logFile ) , StandardCharsets . UTF_8 ) ) ; String line ; while ( ( line = br . readLine ( ) ) != null ) { <START_BUG> if ( line . contains ( "WFLYLOG0010" ) ) { <END_BUG> br . close ( ) ; Assert . fail ( ( "Every<seq2seq4repair_space>deployment<seq2seq4repair_space>should<seq2seq4repair_space>have<seq2seq4repair_space>defined<seq2seq4repair_space>its<seq2seq4repair_space>own<seq2seq4repair_space>logging<seq2seq4repair_space>profile.<seq2seq4repair_space>But<seq2seq4repair_space>found<seq2seq4repair_space>this<seq2seq4repair_space>line<seq2seq4repair_space>in<seq2seq4repair_space>logs:<seq2seq4repair_space>" + line ) ) ; } } br . close ( ) ; } @ RunAsClient @ Test @ InSequence ( 2 ) public void useDummyProfile1Test ( @ ArquillianResource ( LoggingServlet . class ) URL deployementUrl ) throws IOException , MalformedURLException { } @ RunAsClient @ Test @ InSequence ( 2 ) public void useDummyProfile2Test ( @ ContainerResource ManagementClient managementClient ) throws IOException , MalformedURLException { } private int testResponse ( URL url ) throws IOException , MalformedURLException { } @ RunAsClient @ Test @ InSequence ( 3 ) public void checkDummyLog1Test ( ) throws IOException { } @ RunAsClient @ Test @ InSequence ( 3 ) public void checkDummyLog2Test ( ) throws IOException { } @ RunAsClient @ Test @ InSequence ( 3 ) public void loggingTestLogTest ( ) throws IOException { } @ RunAsClient @ Test @ InSequence ( 4 ) public void runtimeChangesTest ( @ ArquillianResource ( LoggingServlet . class ) URL deployementUrl ) throws IOException { } static void applyUpdate ( ModelNode update , final ModelControllerClient client ) throws IOException { } }

Fix:
if ( line . contains ( "JBAS011509" ) ) {
Buggy code:
public class ParameterizedMethodBinding extends MethodBinding { protected MethodBinding originalMethod ; public ParameterizedMethodBinding ( final ParameterizedTypeBinding parameterizedDeclaringClass , MethodBinding originalMethod ) { } public ParameterizedMethodBinding ( ) { } public static ParameterizedMethodBinding instantiateGetClass ( TypeBinding receiverType , MethodBinding originalMethod , Scope scope ) { ParameterizedMethodBinding method = new ParameterizedMethodBinding ( ) ; method . modifiers = originalMethod . modifiers ; method . selector = originalMethod . selector ; method . declaringClass = originalMethod . declaringClass ; method . typeVariables = NoTypeVariables ; method . originalMethod = originalMethod ; method . parameters = originalMethod . parameters ; method . thrownExceptions = originalMethod . thrownExceptions ; ReferenceBinding genericClassType = scope . getJavaLangClass ( ) ; <START_BUG> method . returnType = scope . createParameterizedType ( genericClassType , new TypeBinding [ ] { scope . environment ( ) . createWildcard ( genericClassType , 0 , receiverType . erasure ( ) , null , Wildcard . EXTENDS ) } , null ) ; <END_BUG> return method ; } public boolean hasSubstitutedParameters ( ) { } public boolean hasSubstitutedReturnType ( ) { } public MethodBinding original ( ) { } }

Fix:
method . returnType = scope . environment ( ) . createParameterizedType ( genericClassType , new TypeBinding [ ] { scope . environment ( ) . createWildcard ( genericClassType , 0 , receiverType . erasure ( ) , null , Wildcard . EXTENDS ) } , null ) ;
Buggy code:
public class URLRewritingModifier extends AbstractTestElement implements Serializable , PreProcessor { private static transient Logger log = Hierarchy . getDefaultHierarchy ( ) . getLoggerFor ( "jmeter.protocol.http" ) ; private Pattern case1 ; private Pattern case2 ; private Pattern case3 ; private Pattern case4 ; transient Perl5Compiler compiler = new Perl5Compiler ( ) ; private static final String ARGUMENT_NAME = "argument_name" ; private static final String PATH_EXTENSION = "path_extension" ; private static final String PATH_EXTENSION_NO_EQUALS = "path_extension_no_equals" ; public void process ( ) { } private void modify ( HTTPSampler sampler , String value ) { } public void setArgumentName ( String argName ) { } private void initRegex ( String argName ) { } public String getArgumentName ( ) { } public void setPathExtension ( boolean pathExt ) { } public void setPathExtensionNoEquals ( boolean pathExtNoEquals ) { } public boolean isPathExtension ( ) { } public boolean isPathExtensionNoEquals ( ) { } public static class Test extends TestCase { SampleResult response ; JMeterContext context ; public Test ( String name ) { } public void setUp ( ) { } public void testGrabSessionId ( ) throws Exception { String html = "location:<seq2seq4repair_space>http:////server.com//index.html?session_id=jfdkjdkf%20jddkfdfjkdjfdf%22;" ; response = new SampleResult ( ) ; response . setResponseData ( html . getBytes ( ) ) ; URLRewritingModifier mod = new URLRewritingModifier ( ) ; mod . setArgumentName ( "session_id" ) ; HTTPSampler sampler = createSampler ( ) ; sampler . addArgument ( "session_id" , "adfasdfdsafasdfasd" ) ; context . setCurrentSampler ( sampler ) ; context . setPreviousResult ( response ) ; mod . process ( ) ; Arguments args = sampler . getArguments ( ) ; assertEquals ( "jfdkjdkf<seq2seq4repair_space>jddkfdfjkdjfdf\"" , ( ( org . apache . jmeter . config . Argument ) ( args . getArguments ( ) . get ( 0 ) . getObjectValue ( ) ) ) . getValue ( ) ) ; <START_BUG> assertEquals ( "http:////server.com:80//index.html?session_id=jfdkjdkf+jddkfdfjkdjfdf%22" , sampler . toString ( ) ) ; <END_BUG> } public void testGrabSessionId2 ( ) throws Exception { } private HTTPSampler createSampler ( ) { } public void testGrabSessionId3 ( ) throws Exception { } public void testGrabSessionId4 ( ) throws Exception { } } }

Fix:
assertEquals ( "http:////server.com//index.html?session_id=jfdkjdkf+jddkfdfjkdjfdf%22" , sampler . toString ( ) ) ;
Buggy code:
public class Menu extends Activity { MediaPlayer menuLoop ; private Toast loadMessage ; private Runnable gameLauncher ; private Intent gameIntent ; private Handler mHandler ; private Button mPlayButton ; @ Override public void onCreate ( Bundle savedInstanceState ) { requestWindowFeature ( FEATURE_NO_TITLE ) ; getWindow ( ) . setFlags ( FLAG_FULLSCREEN , FLAG_FULLSCREEN ) ; super . onCreate ( savedInstanceState ) ; setContentView ( menu ) ; loadMessage = Toast . makeText ( getApplicationContext ( ) , "loading<seq2seq4repair_space>game..." , LENGTH_SHORT ) ; <START_BUG> loadMessage . setGravity ( ( ( Gravity . CENTER ) | ( Gravity . CENTER ) ) , 0 , 0 ) ; <END_BUG> gameIntent = new Intent ( this , main . class ) ; mPlayButton = ( ( Button ) ( findViewById ( startButton ) ) ) ; mPlayButton . setClickable ( true ) ; mPlayButton . setEnabled ( true ) ; gameLauncher = new Runnable ( ) { public void run ( ) { mPlayButton . setClickable ( false ) ; mPlayButton . getBackground ( ) . setColorFilter ( GRAY , MULTIPLY ) ; startActivityForResult ( gameIntent , 0 ) ; } } ; mHandler = new Handler ( ) ; } public void playGame ( View view ) { } public void playGameWithFPS ( View view ) { } public void showScore ( View view ) { } public void showInfo ( View view ) { } protected void onActivityResult ( int requestCode , int resultCode , Intent data ) { } public void donate ( View view ) { } protected Dialog onCreateDialog ( int id ) { } }

Fix:
loadMessage . setGravity ( CENTER , 0 , 0 ) ;
Buggy code:
public abstract class DelayedEntitySystem extends EntitySystem { private boolean dirty = true ; private boolean idle = true ; protected LayerManager layerManager ; private ImmutableBag < Entity > entities ; private DelayedEntitySystem [ ] prerequisites = new DelayedEntitySystem [ 0 ] ; public DelayedEntitySystem ( Aspect aspect ) { } private LinkedList < DelayedEntitySystem . Job > jobs = new LinkedList < > ( ) ; public static abstract interface Job extends Runnable { boolean isCompleted ( ) { } } protected long maxDuration ( ) { } @ Override protected void processEntities ( ImmutableBag < Entity > entities ) { if ( dirty ) { if ( ! ( prerequisitesMet ( ) ) ) return ; dirty = false ; idle = false ; jobs . clear ( ) ; collectJobs ( entities , jobs ) ; } long start = TimeUtils . millis ( ) ; long now = start ; while ( now <= ( start + ( maxDuration ( ) ) ) ) { <START_BUG> DelayedEntitySystem . Job runnable = jobs . peekFirst ( ) ; <END_BUG> if ( runnable != null ) { runnable . run ( ) ; if ( runnable . isCompleted ( ) ) { jobs . removeFirst ( ) ; } } if ( jobs . isEmpty ( ) ) { if ( ! ( idle ) ) { postJobs ( ) ; idle = true ; } break ; } now = TimeUtils . millis ( ) ; } } protected void postJobs ( ) { } protected boolean prerequisitesMet ( ) { } protected abstract void collectJobs ( ImmutableBag < Entity > entities , LinkedList < DelayedEntitySystem . Job > jobs ) { } public boolean isDirty ( ) { } public void setDirty ( boolean dirty ) { } public boolean isIdle ( ) { } public void setPrerequisiteSystems ( DelayedEntitySystem ... prerequisites ) { } }

Fix:
DelayedEntitySystem . Job runnable = ( ! ( jobs . isEmpty ( ) ) ) ? jobs . get ( 0 ) : null ;
Buggy code:
public class AccountFilter extends AbstractFilter { int criteriaCondition ; int criteriaAccountUid ; public AccountFilter ( ) { } public boolean process ( IFolder folder , Object uid ) throws Exception { } public void setUp ( FilterCriteria f ) { criteriaCondition = f . getCriteria ( ) ; <START_BUG> criteriaAccountUid = f . getInteger ( "account.uid" , ( - 1 ) ) ; <END_BUG> } }

Fix:
criteriaAccountUid = f . getIntegerWithDefault ( "account.uid" , ( - 1 ) ) ;
Buggy code:
public class VersionedMapNode { public final VersionedMapNodeFactory factory ; protected final AtomicReference < VersionedMapNodeData > dataReference = new AtomicReference < > ( ) ; protected final int durableLength ; protected ByteBuffer byteBuffer ; protected VersionedMapNode ( VersionedMapNodeFactory factory ) { } protected VersionedMapNode ( VersionedMapNodeFactory factory , ByteBuffer byteBuffer ) { } protected VersionedMapNode ( VersionedMapNodeFactory factory , int level , VersionedMapNode leftNode , VersionedListNode listNode , VersionedMapNode rightNode , Comparable key ) { } protected VersionedMapNodeData getData ( ) { } protected boolean isNil ( ) { } protected VersionedListNode getList ( Comparable key ) { } public int totalSize ( Comparable key ) { } public ListAccessor listAccessor ( Comparable key ) { } public ListAccessor listAccessor ( Comparable key , long time ) { } public VersionedMapNode add ( Comparable key , Object value , long time ) { } public VersionedMapNode add ( Comparable key , int ndx , Object value , long time ) { } protected VersionedMapNode add ( Comparable key , int ndx , Object value , long created , long deleted ) { } public VersionedMapNode remove ( Comparable key , int ndx , long time ) { } public VersionedMapNode clearList ( Comparable key , long time ) { } public VersionedMapNode set ( Comparable key , Object value , long time ) { } public VersionedMapNode clearMap ( long time ) { } public VersionedListNode copyList ( Comparable key ) { } public VersionedListNode copyList ( Comparable key , long time ) { } public NavigableSet < Comparable > flatKeys ( long time ) { } public NavigableMap < Comparable , List > flatMap ( long time ) { } public VersionedMapNode copyMap ( ) { } public VersionedMapNode copyMap ( long time ) { } public int totalSize ( ) { } public int size ( long time ) { } public Comparable firstKey ( long time ) { } public Comparable lastKey ( long time ) { } public Comparable higherKey ( Comparable key , long time ) { } public Comparable ceilingKey ( Comparable key , long time ) { } public Comparable lowerKey ( Comparable key , long time ) { } public Comparable floorKey ( Comparable key , long time ) { } public Iterator < ListAccessor > iterator ( long time ) { } public MapAccessor mapAccessor ( ) { } public MapAccessor mapAccessor ( long time ) { } int getDurableLength ( ) { } public void writeDurable ( ByteBuffer byteBuffer ) { if ( isNil ( ) ) { byteBuffer . putChar ( factory . nilVersionedMapId ) ; return ; } <START_BUG> byteBuffer . putChar ( factory . nilVersionedMapId ) ; <END_BUG> serialize ( byteBuffer ) ; } public void serialize ( ByteBuffer byteBuffer ) { } }

Fix:
byteBuffer . putChar ( factory . id ) ;
Buggy code:
public final class WicketTagIdentifier extends AbstractMarkupFilter { private static List wellKnownTagNames ; private final Markup markup ; public WicketTagIdentifier ( final Markup markup ) { } public MarkupElement nextTag ( ) throws ParseException { XmlTag xmlTag = ( ( XmlTag ) ( getParent ( ) . nextTag ( ) ) ) ; if ( xmlTag == null ) { return xmlTag ; } final String namespace = this . markup . getWicketNamespace ( ) ; ComponentTag tag ; if ( namespace . equalsIgnoreCase ( xmlTag . getNamespace ( ) ) ) { tag = new org . apache . wicket . markup . WicketTag ( xmlTag ) ; tag . setId ( ( "_" + ( tag . getName ( ) ) ) ) ; if ( ( WicketTagIdentifier . wellKnownTagNames . contains ( xmlTag . getName ( ) ) ) == false ) { <START_BUG> throw new ParseException ( ( ( "Unkown<seq2seq4repair_space>tag<seq2seq4repair_space>name<seq2seq4repair_space>with<seq2seq4repair_space>Wicket<seq2seq4repair_space>namespace:<seq2seq4repair_space>'" + ( xmlTag . getName ( ) ) ) + "'.<seq2seq4repair_space>Might<seq2seq4repair_space>be<seq2seq4repair_space>you<seq2seq4repair_space>haven't<seq2seq4repair_space>installed<seq2seq4repair_space>the<seq2seq4repair_space>appropriate<seq2seq4repair_space>resolver?" ) , tag . getPos ( ) ) ; <END_BUG> } } else { tag = new ComponentTag ( xmlTag ) ; } final String value = tag . getAttributes ( ) . getString ( ( namespace + ":id" ) ) ; if ( value != null ) { if ( ( value . trim ( ) . length ( ) ) == 0 ) { throw new ParseException ( "The<seq2seq4repair_space>wicket:id<seq2seq4repair_space>attribute<seq2seq4repair_space>value<seq2seq4repair_space>must<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>empty.<seq2seq4repair_space>May<seq2seq4repair_space>be<seq2seq4repair_space>unmatched<seq2seq4repair_space>quotes?!?" , tag . getPos ( ) ) ; } tag . setId ( value ) ; } return tag ; } public static final void registerWellKnownTagName ( final String name ) { } }

Fix:
throw new ParseException ( ( ( "Unknown<seq2seq4repair_space>tag<seq2seq4repair_space>name<seq2seq4repair_space>with<seq2seq4repair_space>Wicket<seq2seq4repair_space>namespace:<seq2seq4repair_space>'" + ( xmlTag . getName ( ) ) ) + "'.<seq2seq4repair_space>Might<seq2seq4repair_space>be<seq2seq4repair_space>you<seq2seq4repair_space>haven't<seq2seq4repair_space>installed<seq2seq4repair_space>the<seq2seq4repair_space>appropriate<seq2seq4repair_space>resolver?" ) , tag . getPos ( ) ) ;
Buggy code:
public class AuditEventDAOTest { protected static EntityManagerFactory emf ; protected EntityManager mgr ; @ BeforeClass public static void createEntityManagerFactory ( ) { <START_BUG> AuditEventDAOTest . emf = Persistence . createEntityManagerFactory ( "EsbMessageAdminTestErrorPU" ) ; <END_BUG> } @ Before public void createEntityManager ( ) { } @ Test public void testAuditEventCreation ( ) { } @ Test public void testAuditEventRemoval ( ) { } @ Test public void testAuditEventFindAll ( ) { } @ Test public void testAuditEventSearch ( ) { } @ After public void closeEntityManager ( ) { } @ AfterClass public static void closeEntityManagerFactory ( ) { } }

Fix:
AuditEventDAOTest . emf = Persistence . createEntityManagerFactory ( "EsbMessageAdminTestPU" ) ;
Buggy code:
public class Chgrp extends AbstractAccessTask { private boolean haveGroup = false ; public Chgrp ( ) { } public void setGroup ( String group ) { } protected void checkConfiguration ( ) { } public void setExecutable ( String e ) { <START_BUG> throw new org . apache . tools . ant . BuildException ( ( ( ( taskType ) + "<seq2seq4repair_space>doesn\'t<seq2seq4repair_space>support<seq2seq4repair_space>the<seq2seq4repair_space>executable" ) + "<seq2seq4repair_space>attribute" ) , getLocation ( ) ) ; <END_BUG> } }

Fix:
throw new org . apache . tools . ant . BuildException ( ( ( ( getTaskType ( ) ) + "<seq2seq4repair_space>doesn\'t<seq2seq4repair_space>support<seq2seq4repair_space>the<seq2seq4repair_space>executable" ) + "<seq2seq4repair_space>attribute" ) , getLocation ( ) ) ;
Buggy code:
@ Singleton public class GithubAuthProvider extends AuthProvider { private static final Logger LOGGER = LoggerFactory . getLogger ( GithubAuthProvider . class ) ; private static final String GITHUB_PROVIDER_NAME = "Github" ; private IdentityProvider identityProvider ; @ EJB private IdentityProviderService identityProviderService ; @ EJB private PropertiesService propertiesService ; @ EJB private ConfigurationService configurationService ; @ EJB private UserService userService ; @ EJB private AccessKeyService accessKeyService ; @ EJB private IdentityProviderUtils identityProviderUtils ; @ PostConstruct private void initialize ( ) { } @ Override public boolean isIdentityProviderAllowed ( ) { } @ Override public AccessKey createAccessKey ( @ NotNull final AccessKeyRequest request ) { } private String getAccessToken ( final String code ) { } private String getIdentityProviderEmail ( final String accessToken ) { } private User findUser ( final String email ) { final User user = userService . findGithubUser ( email ) ; if ( user == null ) { GithubAuthProvider . LOGGER . error ( "No<seq2seq4repair_space>user<seq2seq4repair_space>with<seq2seq4repair_space>email<seq2seq4repair_space>{}<seq2seq4repair_space>found<seq2seq4repair_space>for<seq2seq4repair_space>identity<seq2seq4repair_space>provider<seq2seq4repair_space>{}" , email , GithubAuthProvider . GITHUB_PROVIDER_NAME ) ; <START_BUG> throw new com . devicehive . exceptions . HiveException ( String . format ( USER_NOT_FOUND , email ) , NOT_FOUND . getStatusCode ( ) ) ; <END_BUG> } else if ( ( user . getStatus ( ) ) != ( UserStatus . ACTIVE ) ) { GithubAuthProvider . LOGGER . error ( String . format ( USER_NOT_ACTIVE , user . getId ( ) ) ) ; throw new com . devicehive . exceptions . HiveException ( UNAUTHORIZED . getReasonPhrase ( ) , UNAUTHORIZED . getStatusCode ( ) ) ; } return user ; } }

Fix:
throw new com . devicehive . exceptions . HiveException ( String . format ( USER_NOT_FOUND , email ) , UNAUTHORIZED . getStatusCode ( ) ) ;
Buggy code:
public class AjaxFormValidatingBehavior extends AjaxFormSubmitBehavior { private static final long serialVersionUID = 1L ; public AjaxFormValidatingBehavior ( Form < ? > form , String event ) { } @ Override protected void onSubmit ( final AjaxRequestTarget target ) { } @ Override protected void onError ( AjaxRequestTarget target ) { } private void addFeedbackPanels ( final AjaxRequestTarget target ) { getComponent ( ) . getPage ( ) . visitChildren ( IFeedback . class , new org . apache . wicket . util . visit . IVisitor < Component , Void > ( ) { public void component ( final Component component , final IVisit < Void > visit ) { <START_BUG> target . addComponent ( component ) ; <END_BUG> } } ) ; } public static void addToAllFormComponents ( final Form < ? > form , final String event ) { } public static void addToAllFormComponents ( final Form < ? > form , final String event , final Duration throttleDelay ) { } }

Fix:
target . add ( component ) ;
Buggy code:
public class QueryKey implements Externalizable { private static Collection s_unmod = new HashSet ( ) ; private String _candidateClassName ; private boolean _subclasses ; private Set _accessPathClassNames ; private String _query ; private boolean _ignoreChanges ; private Map _params ; private long _rangeStart ; private long _rangeEnd ; private int _timeout = - 1 ; public static QueryKey newInstance ( Query q ) { } public static QueryKey newInstance ( Query q , Object [ ] args ) { } public static QueryKey newInstance ( Query q , Map args ) { } static QueryKey newInstance ( QueryContext q , boolean packed , Object [ ] args , Class candidate , boolean subs , long startIdx , long endIdx ) { } static QueryKey newInstance ( QueryContext q , boolean packed , Map args , Class candidate , boolean subs , long startIdx , long endIdx ) { } private static QueryKey createKey ( QueryContext q , boolean packed , Class candidateClass , boolean subclasses , long startIdx , long endIdx ) { } private static boolean setParams ( QueryKey key , QueryContext q , Object [ ] args ) { } private static boolean setParams ( QueryKey key , StoreContext ctx , Map params ) { } public QueryKey ( ) { } public String getCandidateTypeName ( ) { } public int getTimeout ( ) { } public boolean changeInvalidatesQuery ( Collection changed ) { } private static boolean intersects ( Collection names , Collection changed ) { } public boolean equals ( Object ob ) { } public int hashCode ( ) { } public String toString ( ) { <START_BUG> StringBuffer buf = new StringBuffer ( 255 ) ; <END_BUG> buf . append ( super . toString ( ) ) . append ( "[query:[" ) . append ( _query ) . append ( "]" ) . append ( ",access<seq2seq4repair_space>path:" ) . append ( _accessPathClassNames ) . append ( ",subs:" ) . append ( _subclasses ) . append ( ",ignoreChanges:" ) . append ( _ignoreChanges ) . append ( ",startRange:" ) . append ( _rangeStart ) . append ( ",endRange:" ) . append ( _rangeEnd ) . append ( ",timeout:" ) . append ( _timeout ) . append ( "]" ) ; return buf . toString ( ) ; } public void writeExternal ( ObjectOutput out ) throws IOException { } public void readExternal ( ObjectInput in ) throws IOException , ClassNotFoundException { } public Set < String > getAcessPathClassNames ( ) { } }

Fix:
StringBuilder buf = new StringBuilder ( 1024 ) ;
Buggy code:
public class GraphAwareJetty9WebServer extends Jetty9WebServer { private static final Logger LOG = LoggerFactory . getLogger ( GraphAwareJetty9WebServer . class ) ; private static final String GA_API_CONTEXT_PATH_SETTING = "com.graphaware.server.api.uri" ; private static final String GA_API_CONTEXT_PATH_DEFAULT = "graphaware" ; private static final String GA_API_PACKAGE_SCAN_SETTING = "com.graphaware.server.api.scan" ; private static final String [ ] GA_API_PACKAGE_SCAN_DEFAULT = new String [ ] { "com.**.graphaware.**" , "org.**.graphaware.**" , "net.**.graphaware.**" } ; private final Config config ; private LongRunningTransactionFilter txFilter ; private Database database ; public GraphAwareJetty9WebServer ( Logging logging , Database database , Config config ) { } @ Override protected void startJetty ( ) { } protected ApplicationContext createRootApplicationContext ( ) { } protected void addHandlers ( HandlerList handlerList , SessionManager sessionManager , ApplicationContext rootContext ) { } protected void addFilters ( ) { } protected void addFilterToAllHandlers ( FilterHolder filterHolder ) { } protected ServletContextHandler createGraphAwareHandler ( SessionManager sessionManager , ApplicationContext rootContext ) { } protected final void addDefaultFilters ( ServletContextHandler context ) { try { <START_BUG> Method m = this . getClass ( ) . getSuperclass ( ) . getDeclaredMethod ( "addFiltersTo" , ServletContextHandler . class ) ; <END_BUG> m . setAccessible ( true ) ; m . invoke ( this , context ) ; } catch ( NoSuchMethodException | InvocationTargetException | IllegalAccessException e ) { throw new RuntimeException ( e ) ; } } protected final void prependHandler ( HandlerList handlerList , ServletContextHandler handler ) { } private HandlerList findHandlerList ( ) { } private SessionManager findSessionManager ( HandlerList handlerList ) { } private void addFilter ( HandlerList handlerList , FilterHolder filterHolder ) { } private String getContextPath ( Config config ) { } private String [ ] getPackagesToScan ( Config config ) { } @ Override public void setDefaultInjectables ( Collection < InjectableProvider < ? > > defaultInjectables ) { } public class JettyStartingListener extends AbstractLifeCycle . AbstractLifeCycleListener { private final WebApplicationInitializer initializer ; private final ServletContext sc ; public JettyStartingListener ( WebApplicationInitializer initializer , ServletContext sc ) { } @ Override public void lifeCycleStarting ( LifeCycle event ) { } } public Config getConfig ( ) { } }

Fix:
Method m = Jetty9WebServer . class . getDeclaredMethod ( "addFiltersTo" , ServletContextHandler . class ) ;
Buggy code:
public class SecurityDomainModelv1UnitTestCase extends AbstractSubsystemTest { public SecurityDomainModelv1UnitTestCase ( ) { } @ Test public void testParseAndMarshalModel ( ) throws Exception { } @ Test public void testParseAndMarshalModelWithJASPI ( ) throws Exception { String subsystemXml = readResource ( "securitysubsystemJASPIv1.xml" ) ; KernelServices servicesA = super . installInController ( MANAGEMENT , subsystemXml ) ; ModelNode modelA = servicesA . readWholeModel ( ) ; String marshalled = servicesA . getPersistedSubsystemXml ( ) ; servicesA . shutdown ( ) ; System . out . println ( marshalled ) ; KernelServices servicesB = super . installInController ( MANAGEMENT , marshalled ) ; ModelNode modelB = servicesB . readWholeModel ( ) ; super . compare ( modelA , modelB ) ; <START_BUG> assertRemoveSubsystemResources ( servicesA ) ; <END_BUG> } }

Fix:
assertRemoveSubsystemResources ( servicesB ) ;
Buggy code:
public class GenerateFromCSV { private String directory ; private String filename ; private String fullFileName ; private String [ ] headerList ; private ArrayList < String [ ] > listProcessed ; private int numVars ; private double [ ] [ ] data ; private String [ ] distSummaryArr ; public GenerateFromCSV ( ) { } public void setFileDirectory ( File eplusFile ) { } public double [ ] [ ] getData ( ) { } public String [ ] getDistSummary ( ) { } public String [ ] getHeaderList ( ) { } public void generateRV ( int simulationNumber , String sortby , String dataType ) { } private void editSummaries ( ) { } private void modifyData ( ) { } private void fillWithNaN ( ArrayList < String [ ] > list ) { } private void writeCSV ( ) { try { <START_BUG> FileWriter w = new FileWriter ( ( ( directory ) + ( filename ) ) , false ) ; <END_BUG> for ( int i = 0 ; i < ( listProcessed . size ( ) ) ; i ++ ) { String [ ] temp = listProcessed . get ( i ) ; for ( int j = 0 ; j < ( temp . length ) ; j ++ ) { w . append ( temp [ j ] ) ; if ( j < ( ( temp . length ) - 1 ) ) { w . append ( "," ) ; } } if ( i < ( ( listProcessed . size ( ) ) - 1 ) ) { w . append ( "\n" ) ; } } w . flush ( ) ; w . close ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } }

Fix:
FileWriter w = new FileWriter ( ( ( ( directory ) + "\\Output_" ) + ( filename ) ) , false ) ;
Buggy code:
public class TestInfoFileParser { @ Test public void shouldParseInfoFile ( ) { InfoFileParser parser = new InfoFileParser ( ) ; Reader reader = ResourceUtilities . getReader ( "classpath:edu//mayo//mprc//searchdb//info.tsv" , TestInfoFileParser . class ) ; final InfoFileData data = parser . parse ( reader ) ; Assert . assertEquals ( data . getMs1Spectra ( ) , 2334 ) ; Assert . assertEquals ( data . getMs2Spectra ( ) , 6626 ) ; Assert . assertEquals ( data . getMs3PlusSpectra ( ) , 1 ) ; Assert . assertEquals ( data . getInstrumentName ( ) , "LTQ<seq2seq4repair_space>Orbitrap" ) ; Assert . assertEquals ( data . getInstrumentSerialNumber ( ) , "1063B" ) ; <START_BUG> Assert . assertEquals ( data . getStartTime ( ) , new DateTime ( 2010 , 4 , 8 , 18 , 17 , 49 ) ) ; <END_BUG> Assert . assertEquals ( data . getRunTimeInSeconds ( ) , 4500.49 ) ; Assert . assertEquals ( data . getComment ( ) , "yeast<seq2seq4repair_space>TD<seq2seq4repair_space>60K,<seq2seq4repair_space>top5,<seq2seq4repair_space>1ug<seq2seq4repair_space>in<seq2seq4repair_space>100uL,<seq2seq4repair_space>inj<seq2seq4repair_space>5uL," ) ; Assert . assertEquals ( data . getSampleId ( ) , "post<seq2seq4repair_space>Ch2&Ch1<seq2seq4repair_space>flush;<seq2seq4repair_space>std<seq2seq4repair_space>config" ) ; } }

Fix:
Assert . assertEquals ( data . getStartTime ( ) , new DateTime ( 2010 , 4 , 8 , 18 , 17 , 49 , 0 ) ) ;
Buggy code:
class CLabelTab extends AlignableTab { CLabel label1 ; CLabel label2 ; CLabel label3 ; Group textLabelGroup ; Button shadowInButton ; Button shadowOutButton ; Button shadowNoneButton ; CLabelTab ( ControlExample instance ) { } void createExampleGroup ( ) { } void createExampleWidgets ( ) { } void createStyleGroup ( ) { } Control [ ] getExampleWidgets ( ) { } String [ ] getMethodNames ( ) { <START_BUG> return new String [ ] { "Text" } ; <END_BUG> } String getTabText ( ) { } void setExampleWidgetAlignment ( ) { } void setExampleWidgetState ( ) { } }

Fix:
return new String [ ] { "Text" , "ToolTipText" } ;
Buggy code:
public final class ServerStartTask implements ObjectInputValidation , Serializable , ServerTask { private static final long serialVersionUID = - 8505496119636153918L ; private final String serverName ; private final int portOffset ; private final List < ServiceActivator > startServices ; private final List < ModelNode > updates ; private final ServerEnvironment providedEnvironment ; public ServerStartTask ( final String serverName , final int portOffset , final List < ServiceActivator > startServices , final List < ModelNode > updates ) { } @ Override public void run ( final List < ServiceActivator > runServices ) { final Bootstrap bootstrap = Factory . newInstance ( ) ; final Bootstrap . Configuration configuration = new Bootstrap . Configuration ( ) ; configuration . setServerEnvironment ( providedEnvironment ) ; configuration . setConfigurationPersister ( new AbstractConfigurationPersister ( new org . jboss . as . controller . parsing . StandaloneXml ( configuration . getModuleLoader ( ) ) ) { @ Override public void store ( final ModelNode model ) throws ConfigurationPersistenceException { } @ Override public List < ModelNode > load ( ) throws ConfigurationPersistenceException { return updates ; } } ) ; <START_BUG> bootstrap . start ( configuration , startServices ) ; <END_BUG> } @ Override public void validateObject ( ) throws InvalidObjectException { } private void readObject ( ObjectInputStream ois ) throws IOException , ClassNotFoundException { } }

Fix:
bootstrap . bootstrap ( configuration , startServices ) ;
Buggy code:
public class NSCell extends NSObject { public NSCell ( ) { } public NSCell ( int id ) { } public NSCell ( id id ) { } public void drawInteriorWithFrame ( NSRect cellFrame , NSView controlView ) { } public NSRect drawingRectForBounds ( NSRect theRect ) { } public void setAllowsMixedState ( boolean flag ) { } public void setAttributedStringValue ( NSAttributedString obj ) { } public void setImage ( NSImage image ) { } public void setTitle ( NSString aString ) { } public void setWraps ( boolean flag ) { } public NSString title ( ) { } public boolean wraps ( ) { <START_BUG> return ( OS . objc_msgSend ( this . id , sel_wraps ) ) != 0 ; <END_BUG> } }

Fix:
return OS . objc_msgSend_bool ( this . id , sel_wraps ) ;
Buggy code:
public class GenericsWildCardTypeXTestCase extends TestCase { public void testIdentity ( ) { <START_BUG> TypeX anything = GenericsWildcardTypeX . GENERIC_WILDCARD ; <END_BUG> assertEquals ( "Ljava//lang//Object;" , anything . getSignature ( ) ) ; } public void testResolving ( ) { } }

Fix:
UnresolvedType anything = GenericsWildcardTypeX . GENERIC_WILDCARD ;
Buggy code:
public class ComplexWordSentenceFragment extends SelectableFragment implements View . OnTouchListener { private List < Integer > wordIndexList ; @ Override public void onResume ( ) { } @ Override protected void init ( ) { super . init ( ) ; this . wordIndexList = new ArrayList < > ( ) ; String text = "" ; <START_BUG> for ( String str : ( ( com . jfsiot . touchselect . touchselecttest . activity . MainActivity ) ( getActivity ( ) ) ) . getTextSourse ( 1 ) ) { <END_BUG> text += str ; wordIndexList . add ( text . length ( ) ) ; } free ( ) ; } @ Override protected String [ ] getStringArrayResourse ( ) { } @ Override protected void touchInner ( boolean isLeft , int letterOffset ) { } @ Override protected void touchOuter ( boolean isLeft , int letterOffset ) { } }

Fix:
for ( String str : ( ( com . jfsiot . touchselect . touchselecttest . activity . MainActivity ) ( getActivity ( ) ) ) . getTextSourse ( 0 ) ) {
Buggy code:
public class MathException extends Exception { private static final long serialVersionUID = - 8602234299177097102L ; private static final boolean JDK_SUPPORTS_NESTED ; private static ResourceBundle cachedResources = null ; private final String pattern ; private final Object [ ] arguments ; private final Throwable rootCause ; private static String translate ( String s , Locale locale ) { try { if ( ( ( MathException . cachedResources ) == null ) || ( ! ( MathException . cachedResources . getLocale ( ) . equals ( locale ) ) ) ) { MathException . cachedResources = ResourceBundle . getBundle ( "org.apache.commons.math.MessagesResources" , locale ) ; } <START_BUG> if ( MathException . cachedResources . getLocale ( ) . equals ( locale ) ) { <END_BUG> return MathException . cachedResources . getString ( s ) ; } } catch ( MissingResourceException mre ) { } return s ; } public MathException ( ) { } public MathException ( String msg ) { } public MathException ( String pattern , Object [ ] arguments ) { } public MathException ( Throwable rootCause ) { } public MathException ( String msg , Throwable rootCause ) { } public MathException ( String pattern , Object [ ] arguments , Throwable rootCause ) { } public String getPattern ( ) { } public Object [ ] getArguments ( ) { } public String getMessage ( Locale locale ) { } public Throwable getCause ( ) { } public void printStackTrace ( ) { } public void printStackTrace ( PrintStream out ) { } public void printStackTrace ( PrintWriter out ) { } }

Fix:
if ( MathException . cachedResources . getLocale ( ) . getLanguage ( ) . equals ( locale . getLanguage ( ) ) ) {
Buggy code:
public class StandardArgumentsControllerTests { private MockMvc mockMvc ; @ Before public void setup ( ) throws Exception { } @ Test public void request ( ) throws Exception { <START_BUG> this . mockMvc . perform ( get ( "//data//standard//request" ) ) . andExpect ( content ( ) . string ( startsWith ( "request<seq2seq4repair_space>=<seq2seq4repair_space>org.springframework.mock.web.MockHttpServletRequest@" ) ) ) ; <END_BUG> } @ Test public void requestReader ( ) throws Exception { } @ Test public void requestIs ( ) throws Exception { } @ Test public void response ( ) throws Exception { } @ Test public void writer ( ) throws Exception { } @ Test public void os ( ) throws Exception { } @ Test public void session ( ) throws Exception { } }

Fix:
this . mockMvc . perform ( get ( "//data//standard//request" ) ) . andExpect ( content ( ) . string ( startsWith ( "request<seq2seq4repair_space>=<seq2seq4repair_space>org.springframework.test.web.mock.servlet.request.Servlet3MockHttpServletRequest@" ) ) ) ;
Buggy code:
public class SaveWorkState { private ContextProvider _contextProvider ; private SaveOptions _saveOptions ; private List < Map > _entityMaps ; private Map < Class , List < EntityInfo > > _saveMap ; private List < EntityInfo > _entitiesWithAutoGeneratedKeys ; private List < KeyMapping > _keyMappings ; private List < EntityError > _entityErrors ; public SaveWorkState ( Map saveBundle ) { } public SaveOptions getSaveOptions ( ) { } public Metadata getMetadata ( ) { } public List < EntityInfo > getEntitiesWithAutoGeneratedKeys ( ) { } public Map < Class , List < EntityInfo > > getSaveMap ( ) { } public void setContextProvider ( ContextProvider contextProvider ) { } public void setKeyMappings ( List < KeyMapping > keyMappings ) { } public void setEntityErrors ( List < EntityError > entityErrors ) { } protected void beforeSave ( ) throws EntityErrorsException { } protected void afterSave ( ) throws EntityErrorsException { } protected boolean beforeSaveEntity ( EntityInfo entityInfo ) throws EntityErrorsException { } protected Map < Class , List < EntityInfo > > beforeSaveEntities ( Map < Class , List < EntityInfo > > saveMap ) throws EntityErrorsException { } public List < EntityInfo > beforeSaveEntityGraph ( List < EntityInfo > entitiesToPersist ) throws EntityErrorsException { } protected void afterSaveEntities ( Map < Class , List < EntityInfo > > saveMap , List < KeyMapping > keyMappings ) throws EntityErrorsException { } public boolean handleException ( Exception e ) { } public void addToSaveMap ( EntityInfo entityInfo ) { } public EntityInfo createEntityInfoForEntity ( Object entity , EntityState entityState ) { } public SaveResult toSaveResult ( ) { } private EntityInfo createEntityInfoFromJson ( Map map ) { EntityInfo info = new EntityInfo ( ) ; Map aspect = ( ( Map ) ( map . get ( "entityAspect" ) ) ) ; map . remove ( "entityAspect" ) ; String entityTypeName = ( ( String ) ( aspect . get ( "entityTypeName" ) ) ) ; Class type = MetadataHelper . lookupClass ( entityTypeName ) ; info . entityType = getMetadata ( ) . getEntityType ( entityTypeName ) ; info . entity = JsonGson . fromMap ( type , map ) ; info . entityState = EntityState . valueOf ( ( ( String ) ( aspect . get ( "entityState" ) ) ) ) ; info . originalValuesMap = ( ( Map ) ( aspect . get ( "originalValuesMap" ) ) ) ; <START_BUG> info . unmappedValuesMap = ( ( Map ) ( aspect . get ( "unmappedValuesMap" ) ) ) ; <END_BUG> return info ; } }

Fix:
info . unmappedValuesMap = ( ( Map ) ( map . get ( "__unmapped" ) ) ) ;