nus-yam/ex-repair huggingface dataset:
Buggy code:
public class TestContinuation { @ Test public void testFree_Continuation_Not1 ( ) { } @ Test public void testFree_Continuation_FreePlus1 ( ) { } @ Test public void testFree_Continuation_FreePlus2 ( ) { } @ Test public void testFree_Continuation_FreeMinus1 ( ) { } @ Test public void testFree_Continuation_FreeMinus2 ( ) { } @ Test public void testCSpec_EVAL_continuation ( ) { } @ Test public void testCSpec_EVAL_continuation2 ( ) { String inputstr = "<seq2seq4repair_space>C<seq2seq4repair_space>EVAL<seq2seq4repair_space>A<seq2seq4repair_space>=<seq2seq4repair_space>(B*D)//<seq2seq4repair_space>C<seq2seq4repair_space>+\r\n" + "<seq2seq4repair_space>C<seq2seq4repair_space>24\r\n" ; inputstr = TestUtils . pad280 ( inputstr ) ; List < CommonToken > tokenList = TestUtils . runX ( inputstr ) ; <START_BUG> assertTokens ( tokenList , "C" , "" , "" , "" , "EVAL" , "A" , "=" , "(" , "B*D" , ")" , "//" , "C" , "+" , "24" , "" ) ; <END_BUG> } @ Test public void testCSpec_EVAL_continuation3 ( ) { } }

Fix:
assertTokens ( tokenList , "C" , "" , "" , "" , "EVAL" , "A" , "=" , "(" , "B" , "*" , "D" , ")" , "//" , "C" , "+" , "24" , "" ) ;
Buggy code:
public class SynchronizeFolderListCommand extends Command { private Pattern delimiterPattern ; private IMAPRootFolder root ; private IMAPServer store ; private TreeNode node ; private String delimiter ; public SynchronizeFolderListCommand ( SubscribeCommandReference reference ) { } public void execute ( WorkerStatusController worker ) throws Exception { <START_BUG> root = ( ( IMAPRootFolder ) ( ( ( SubscribeCommandReference ) ( getReference ( ) ) ) . getFolder ( ) ) ) ; <END_BUG> store = root . getServer ( ) ; node = createTreeStructure ( ) ; } private List fetchUnsubscribedFolders ( String reference ) throws Exception { } private TreeNode createTreeStructure ( ) throws Exception { } private ListInfoTreeNode insertTreeNode ( ListInfo listInfo , DefaultMutableTreeNode parent ) { } private DefaultMutableTreeNode ensureChild ( String name , String mailbox , DefaultMutableTreeNode parent ) { } public void updateGUI ( ) throws Exception { } }

Fix:
root = ( ( IMAPRootFolder ) ( ( ( SubscribeCommandReference ) ( getReference ( ) ) ) . getSourceFolder ( ) ) ) ;
Buggy code:
public class PlayfieldProgram extends ShaderProgram { protected static final int VERTICES_PER_CHAR = 4 ; protected static final int INDICES_PER_CHAR = 6 ; protected static final int DEFAULT_COMPONENTS = 3 ; private static final String ILLEGAL_DATATYPE_STR = "Illegal<seq2seq4repair_space>datatype:<seq2seq4repair_space>" ; protected static final int UNIFORM_TEX_FRACTION_S_INDEX = 0 ; protected static final int UNIFORM_TEX_FRACTION_T_INDEX = 1 ; protected static final int UNIFORM_TEX_ONEBY_S_INDEX = 2 ; protected static final int ATTRIBUTES_PER_VERTEX = 8 ; protected static final int ATTRIBUTES_PER_CHAR = ( PlayfieldProgram . ATTRIBUTES_PER_VERTEX ) * ( PlayfieldProgram . VERTICES_PER_CHAR ) ; protected static final int ATTRIBUTE_1_OFFSET = 0 ; protected static final int ATTRIBUTE_2_OFFSET = 4 ; protected static final int ATTRIBUTE_CHARMAP_X_INDEX = 0 ; protected static final int ATTRIBUTE_CHARMAP_Y_INDEX = 1 ; protected static final int ATTRIBUTE_CHARMAP_U_INDEX = 2 ; protected static final int ATTRIBUTE_CHARMAP_V_INDEX = 3 ; protected static final int ATTRIBUTE_CHARMAP_FRAME_INDEX = 4 ; protected static final int ATTRIBUTE_CHARMAP_FLAGS_INDEX = 5 ; public enum VARIABLES { uMVPMatrix ( 0 , VariableType . UNIFORM ) , uCharsetData ( 1 , VariableType . UNIFORM ) , aPosition ( 2 , VariableType . ATTRIBUTE ) , aCharset ( 3 , VariableType . ATTRIBUTE ) , aCharset2 ( 4 , VariableType . ATTRIBUTE ) ; public final int index ; private final VariableType type ; private VARIABLES ( int index , VariableType type ) { } } private static final String VERTEX_SHADER_NAME = "assets//charmapvertex.essl" ; private static final String FRAGMENT_SHADER_NAME = "assets//charmapfragment.essl" ; public PlayfieldProgram ( ) { } @ Override public int getVariableIndex ( ShaderVariable variable ) { } @ Override public int getVariableCount ( ) { } @ Override public void bindAttributes ( GLES20Wrapper gles , Mesh mesh ) throws GLException { } @ Override public void bindUniforms ( GLES20Wrapper gles , float [ ] modelviewMatrix , Mesh mesh ) throws GLException { ShaderVariable v = getShaderVariable ( PlayfieldProgram . VARIABLES . uMVPMatrix . index ) ; <START_BUG> System . arraycopy ( modelviewMatrix , 0 , mesh . getUniformMatrices ( ) , 0 , v . getSizeInFloats ( ) ) ; <END_BUG> gles . glUniformMatrix4fv ( getShaderVariable ( PlayfieldProgram . VARIABLES . uMVPMatrix . index ) . getLocation ( ) , v . getSize ( ) , false , mesh . getUniformMatrices ( ) , 0 ) ; GLUtils . handleError ( gles , "glUniformMatrix4fv<seq2seq4repair_space>" ) ; v = getShaderVariable ( PlayfieldProgram . VARIABLES . uCharsetData . index ) ; if ( v != null ) { setVectorUniform ( gles , v , mesh . getUniformVectors ( ) , 0 ) ; } GLUtils . handleError ( gles , "glUniform4fv<seq2seq4repair_space>" ) ; } public void createMesh ( Mesh mesh , Texture2D texture , int charCount , float width , float height , float zPos , int type ) { } @ Override public void createProgram ( GLES20Wrapper gles ) { } }

Fix:
System . arraycopy ( modelviewMatrix , 0 , mesh . getUniformMatrices ( ) , 0 , modelviewMatrix . length ) ;
Buggy code:
public class SchemaLocationRemoveHandler implements OperationStepHandler , DescriptionProvider { public static final String OPERATION_NAME = "remove-schema-location" ; public static final SchemaLocationRemoveHandler INSTANCE = new SchemaLocationRemoveHandler ( ) ; public static ModelNode getRemoveSchemaLocationOperation ( ModelNode address , String schemaURI ) { } private final ParameterValidator typeValidator = new org . jboss . as . controller . operations . validation . ModelTypeValidator ( ModelType . STRING ) ; private SchemaLocationRemoveHandler ( ) { } public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { final ModelNode model = context . readResourceForUpdate ( EMPTY_ADDRESS ) . getModel ( ) ; ModelNode param = operation . get ( URI ) ; typeValidator . validateParameter ( URI , param ) ; ModelNode locations = model . get ( SCHEMA_LOCATIONS ) ; Property toRemove = null ; ModelNode newList = new ModelNode ( ) . setEmptyList ( ) ; String uri = param . asString ( ) ; if ( locations . isDefined ( ) ) { for ( Property location : locations . asPropertyList ( ) ) { if ( uri . equals ( location . getName ( ) ) ) { toRemove = location ; } else { newList . add ( location . getName ( ) , location . getValue ( ) ) ; } } } if ( toRemove != null ) { locations . set ( newList ) ; } else { throw new OperationFailedException ( new ModelNode ( ) . set ( ControllerMessages . MESSAGES . schemaNotFound ( uri ) ) ) ; } <START_BUG> context . completeStep ( NOOP_ROLLBACK_HANDLER ) ; <END_BUG> } @ Override public ModelNode getModelDescription ( Locale locale ) { } }

Fix:
context . stepCompleted ( ) ;
Buggy code:
public class BTree extends AbstractFileCheckpointCollection { public static final String INDEX_FILE_NAME = "checkpoint_btree.idx" ; private static final int SUB_VERSION = 4 ; private static final boolean ALWAYS_CACHE_ROOT = true ; private final int fMaxNumEntries ; private final int fMaxNumChildren ; private final int fMedianEntry ; private BTree . BTreeHeader fBTreeHeader ; private int nodeSize = - 1 ; private final ByteBuffer fNodeByteBuffer ; private final BTreeNodeCache fNodeCache ; private class BTreeHeader extends CheckpointCollectionFileHeader { private static final int SIZE = ( LONG_SIZE ) + ( INT_SIZE ) ; private long fRoot ; private final int fSubVersion ; private BTreeHeader ( int version , int subVersion ) { } private BTreeHeader ( RandomAccessFile randomAccessFile ) throws IOException { } @ Override public int getSubVersion ( ) { } @ Override public int getSize ( ) { } @ Override public void serialize ( RandomAccessFile randomAccessFile ) throws IOException { } } @ Override protected CheckpointCollectionFileHeader createHeader ( ) { } @ Override protected CheckpointCollectionFileHeader createHeader ( RandomAccessFile randomAccessFile ) throws IOException { } @ Override protected int getSubVersion ( ) { } public BTree ( int degree , File file , ITmfPersistentlyIndexable trace ) { } @ Override public void insert ( ITmfCheckpoint checkpoint ) { } private void setRootNode ( BTreeNode newRootNode ) { } private void insert ( ITmfCheckpoint checkpoint , long nodeOffset , BTreeNode pParent , int iParent ) { } int getNodeSize ( ) { } private BTreeNode allocateNode ( ) { } @ Override public long binarySearch ( ITmfCheckpoint checkpoint ) { } public void accept ( IBTreeVisitor treeVisitor ) { } private void accept ( long nodeOffset , IBTreeVisitor visitor ) { } int getMaxNumEntries ( ) { } int getMaxNumChildren ( ) { } ByteBuffer getNodeByteBuffer ( ) { } @ Override public void dispose ( ) { <START_BUG> if ( ( fNodeCache ) != null ) { <END_BUG> fNodeCache . serialize ( ) ; } super . dispose ( ) ; } }

Fix:
if ( ( ( fNodeCache ) != null ) && ( ( getRandomAccessFile ( ) ) != null ) ) {
Buggy code:
public class LevenbergMarquardtOptimizer extends AbstractLeastSquaresOptimizer { private int solvedCols ; private double [ ] diagR ; private double [ ] jacNorm ; private double [ ] beta ; private int [ ] permutation ; private int rank ; private double lmPar ; private double [ ] lmDir ; private double initialStepBoundFactor ; private double costRelativeTolerance ; private double parRelativeTolerance ; private double orthoTolerance ; public LevenbergMarquardtOptimizer ( ) { } public void setInitialStepBoundFactor ( double initialStepBoundFactor ) { } public void setCostRelativeTolerance ( double costRelativeTolerance ) { } public void setParRelativeTolerance ( double parRelativeTolerance ) { } public void setOrthoTolerance ( double orthoTolerance ) { } @ Override protected VectorialPointValuePair doOptimize ( ) throws IllegalArgumentException , FunctionEvaluationException , OptimizationException { } private void determineLMParameter ( double [ ] qy , double delta , double [ ] diag , double [ ] work1 , double [ ] work2 , double [ ] work3 ) { } private void determineLMDirection ( double [ ] qy , double [ ] diag , double [ ] lmDiag , double [ ] work ) { } private void qrDecomposition ( ) throws OptimizationException { for ( int k = 0 ; k < ( cols ) ; ++ k ) { permutation [ k ] = k ; double norm2 = 0 ; for ( int i = 0 ; i < ( jacobian . length ) ; ++ i ) { double akk = jacobian [ i ] [ k ] ; norm2 += akk * akk ; } jacNorm [ k ] = Math . sqrt ( norm2 ) ; } for ( int k = 0 ; k < ( cols ) ; ++ k ) { int nextColumn = - 1 ; double ak2 = Double . NEGATIVE_INFINITY ; for ( int i = k ; i < ( cols ) ; ++ i ) { double norm2 = 0 ; for ( int j = k ; j < ( jacobian . length ) ; ++ j ) { double aki = jacobian [ j ] [ permutation [ i ] ] ; norm2 += aki * aki ; } if ( ( Double . isInfinite ( norm2 ) ) || ( Double . isNaN ( norm2 ) ) ) { throw new OptimizationException ( "unable<seq2seq4repair_space>to<seq2seq4repair_space>perform<seq2seq4repair_space>Q.R<seq2seq4repair_space>decomposition<seq2seq4repair_space>on<seq2seq4repair_space>the<seq2seq4repair_space>{0}x{1}<seq2seq4repair_space>jacobian<seq2seq4repair_space>matrix" , rows , cols ) ; } if ( norm2 > ak2 ) { nextColumn = i ; ak2 = norm2 ; } } <START_BUG> if ( ak2 == 0 ) { <END_BUG> rank = k ; return ; } int pk = permutation [ nextColumn ] ; permutation [ nextColumn ] = permutation [ k ] ; permutation [ k ] = pk ; double akk = jacobian [ k ] [ pk ] ; double alpha = ( akk > 0 ) ? - ( Math . sqrt ( ak2 ) ) : Math . sqrt ( ak2 ) ; double betak = 1.0 // ( ak2 - ( akk * alpha ) ) ; beta [ pk ] = betak ; diagR [ pk ] = alpha ; jacobian [ k ] [ pk ] -= alpha ; for ( int dk = ( ( cols ) - 1 ) - k ; dk > 0 ; -- dk ) { double gamma = 0 ; for ( int j = k ; j < ( jacobian . length ) ; ++ j ) { gamma += ( jacobian [ j ] [ pk ] ) * ( jacobian [ j ] [ permutation [ ( k + dk ) ] ] ) ; } gamma *= betak ; for ( int j = k ; j < ( jacobian . length ) ; ++ j ) { jacobian [ j ] [ permutation [ ( k + dk ) ] ] -= gamma * ( jacobian [ j ] [ pk ] ) ; } } } rank = solvedCols ; } private void qTy ( double [ ] y ) { } }

Fix:
if ( ak2 < 1.0E-66 ) {
Buggy code:
public class RandomControlGui extends AbstractControllerGui { private JCheckBox style ; public RandomControlGui ( ) { } public TestElement createTestElement ( ) { } public void modifyTestElement ( TestElement ic ) { } public void clear ( ) { } public void configure ( TestElement el ) { } public String getLabelResource ( ) { } private void init ( ) { <START_BUG> setLayout ( new VerticalLayout ( 5 , VerticalLayout . LEFT , VerticalLayout . TOP ) ) ; <END_BUG> setBorder ( makeBorder ( ) ) ; add ( makeTitlePanel ( ) ) ; style = new JCheckBox ( JMeterUtils . getResString ( "ignore_subcontrollers" ) ) ; add ( style ) ; } }

Fix:
setLayout ( new VerticalLayout ( 5 , VerticalLayout . BOTH , VerticalLayout . TOP ) ) ;
Buggy code:
@ WebServlet ( urlPatterns = { "//RolloutServlet" } , loadOnStartup = 1 ) public class RolloutPlanTestServlet extends HttpServlet { public static final String BIND_PORT_PARAM = "bindPort" ; public static final String OP_PARAM = "operation" ; public static final String OP_BIND = "bind" ; public static final String OP_UNBIND = "unbind" ; private Date initDate ; private int bindPort ; private ServerSocket socket ; private String host ; private static final Logger log = Logger . getLogger ( RolloutPlanTestServlet . class ) ; protected void processRequest ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } @ Override public void init ( ServletConfig config ) throws ServletException { } @ Override public void destroy ( ) { } protected void doGet ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } protected void doPost ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } private void bind ( ) throws ServletException { if ( ( socket ) != null ) <START_BUG> throw new ServletException ( "Already<seq2seq4repair_space>bound." ) ; <END_BUG> try { socket = new ServerSocket ( ) ; socket . bind ( new InetSocketAddress ( host , bindPort ) ) ; RolloutPlanTestServlet . log . info ( ( ( ( ( "Bound<seq2seq4repair_space>to<seq2seq4repair_space>address<seq2seq4repair_space>" + ( host ) ) + "<seq2seq4repair_space>port<seq2seq4repair_space>" ) + ( bindPort ) ) + "." ) ) ; } catch ( IOException ioe ) { throw new ServletException ( "Bind<seq2seq4repair_space>failed." , ioe ) ; } } private void unbind ( ) throws ServletException { } }

Fix:
throw new ServletException ( "Allready<seq2seq4repair_space>boud." ) ;
Buggy code:
public class WebSession extends Session implements HttpSessionBindingListener { private static final long serialVersionUID = 1L ; private transient IRequestCycleFactory requestCycleFactory ; private transient boolean sessionInvalidated = false ; protected WebSession ( final WebApplication application ) { } public void invalidate ( ) { } public void invalidateNow ( ) { } protected void attach ( ) { } protected void detach ( ) { } protected IRequestCycleFactory getRequestCycleFactory ( ) { } protected void update ( ) { } final void initForRequest ( ) { } public void valueBound ( HttpSessionBindingEvent event ) { } public void valueUnbound ( HttpSessionBindingEvent event ) { <START_BUG> String id = event . getSession ( ) . getId ( ) ; <END_BUG> Application application = getApplication ( ) ; if ( application instanceof WebApplication ) { ( ( WebApplication ) ( application ) ) . sessionDestroyed ( id ) ; } else { } } }

Fix:
String id = getSessionStore ( ) . getId ( ) ;
Buggy code:
final class ConversionUtils { public static Object invokeConverter ( GenericConverter converter , Object source , TypeDescriptor sourceType , TypeDescriptor targetType ) { } public static TypeDescriptor getElementType ( Collection collection ) { } public static List asList ( Object array ) { <START_BUG> return new ConversionUtils . ArrayList ( array ) ; <END_BUG> } private static class ArrayList extends AbstractList implements Serializable , RandomAccess { private Object array ; ArrayList ( Object array ) { } public int size ( ) { } public Object get ( int index ) { } } }

Fix:
return array != null ? new ConversionUtils . ArrayList ( array ) : null ;
Buggy code:
class JarPackageFragment extends PackageFragment implements SuffixConstants { protected JarPackageFragment ( PackageFragmentRoot root , String [ ] names ) { } protected boolean computeChildren ( OpenableElementInfo info , ArrayList entryNames ) { } void computeNonJavaResources ( String [ ] resNames , JarPackageFragmentInfo info , String zipName ) { if ( resNames == null ) { info . setNonJavaResources ( null ) ; return ; } int max = resNames . length ; if ( max == 0 ) { info . setNonJavaResources ( JavaElementInfo . NO_NON_JAVA_RESOURCES ) ; } else { Object [ ] res = new Object [ max ] ; int index = 0 ; for ( int i = 0 ; i < max ; i ++ ) { String resName = resNames [ i ] ; <START_BUG> if ( ! ( resName . toLowerCase ( ) . endsWith ( SuffixConstants . SUFFIX_STRING_java ) ) ) { <END_BUG> resName = Util . concatWith ( this . names , resName , '//' ) ; res [ ( index ++ ) ] = new JarEntryFile ( resName , zipName ) ; } } if ( index != max ) { System . arraycopy ( res , 0 , ( res = new Object [ index ] ) , 0 , index ) ; } info . setNonJavaResources ( res ) ; } } public boolean containsJavaResources ( ) throws JavaModelException { } public ICompilationUnit createCompilationUnit ( String cuName , String contents , boolean force , IProgressMonitor monitor ) throws JavaModelException { } protected Object createElementInfo ( ) { } protected void generateInfos ( Object info , HashMap newElements , IProgressMonitor pm ) throws JavaModelException { } public IClassFile [ ] getClassFiles ( ) throws JavaModelException { } public ICompilationUnit [ ] getCompilationUnits ( ) { } public IResource getCorrespondingResource ( ) { } public Object [ ] getNonJavaResources ( ) throws JavaModelException { } public boolean isReadOnly ( ) { } protected Object [ ] storedNonJavaResources ( ) throws JavaModelException { } }

Fix:
if ( ! ( Util . isJavaLikeFileName ( resName ) ) ) {
Buggy code:
public abstract class SignalPeriodique extends SignalAnalogique { public static final int SINUS = 0 ; public static final int CARRE = 1 ; public static final int TRIANGLE = 2 ; public static final int SCIE = 3 ; public static final int COSINUS = 4 ; protected double amplitude ; protected double frequence ; protected double phase ; public SignalPeriodique ( ) { } public static SignalAnalogique getInstance ( int type , double amplitude , double frequence , double phase , Discretiseur discretiseur ) throws BadTypeException { SignalAnalogique signal ; switch ( type ) { case SignalPeriodique . SINUS : signal = new SignalSinusoidal ( discretiseur , amplitude , frequence , phase ) ; break ; case SignalPeriodique . COSINUS : <START_BUG> signal = new SignalSinusoidal ( discretiseur , amplitude , frequence , phase ) ; <END_BUG> break ; case SignalPeriodique . CARRE : signal = new SignalCarre ( discretiseur , amplitude , frequence , phase ) ; break ; case SignalPeriodique . TRIANGLE : signal = new SignalTriangulaire ( discretiseur , amplitude , frequence , phase ) ; break ; case SignalPeriodique . SCIE : signal = new SignalDentsDeScie ( discretiseur , amplitude , frequence , phase ) ; break ; default : throw new BadTypeException ( "ERREUR:<seq2seq4repair_space>type<seq2seq4repair_space>inconnu" ) ; } return signal ; } }

Fix:
signal = new SignalSinusoidal ( discretiseur , amplitude , frequence , ( phase + ( ( Math . PI ) // 2.0 ) ) ) ;
Buggy code:
public abstract class CompressedFactory extends Factory { private static final long serialVersionUID = 4071505L ; public static final int DENSITY = 4 ; @ Override public Vector createVector ( ) { } @ Override public Vector createVector ( int length ) { } @ Override public Vector createVector ( double [ ] array ) { } @ Override public Vector createVector ( Vector vector ) { } @ Override public Vector createVector ( VectorSource source ) { <START_BUG> return CompressedVector . fromSource ( source ) ; <END_BUG> } @ Override public Vector createConstantVector ( int length , double value ) { } @ Override public Vector createRandomVector ( int length , Random random ) { } }

Fix:
return new org . la4j . vector . sparse . CompressedVector ( source ) ;
Buggy code:
public class ResourceStreamResource extends AbstractResource { private static final long serialVersionUID = 1L ; private final IResourceStream stream ; private String fileName ; private ContentDisposition contentDisposition = ContentDisposition . INLINE ; private String textEncoding ; private String mimeType ; public ResourceStreamResource ( IResourceStream stream ) { } public ResourceStreamResource setFileName ( String fileName ) { } public ResourceStreamResource setContentDisposition ( ContentDisposition contentDisposition ) { } public ResourceStreamResource setTextEncoding ( String textEncoding ) { } @ Override protected ResourceResponse newResourceResponse ( Attributes attributes ) { ResourceResponse data = new ResourceResponse ( ) ; data . setLastModified ( stream . lastModifiedTime ( ) . toDate ( ) ) ; if ( data . dataNeedsToBeWritten ( attributes ) ) { InputStream inputStream = null ; if ( ( ( stream ) instanceof IResourceStreamWriter ) == false ) { try { inputStream = stream . getInputStream ( ) ; } catch ( ResourceStreamNotFoundException e ) { <START_BUG> data . setErrorCode ( SC_NOT_FOUND ) ; <END_BUG> close ( ) ; } } data . setContentDisposition ( contentDisposition ) ; data . setContentLength ( stream . length ( ) ) ; data . setFileName ( fileName ) ; data . setContentType ( stream . getContentType ( ) ) ; data . setTextEncoding ( textEncoding ) ; if ( ( stream ) instanceof IResourceStreamWriter ) { data . setWriteCallback ( new WriteCallback ( ) { @ Override public void writeData ( Attributes attributes ) { ( ( IResourceStreamWriter ) ( stream ) ) . write ( attributes . getResponse ( ) ) ; close ( ) ; } } ) ; } else { final InputStream s = inputStream ; data . setWriteCallback ( new WriteCallback ( ) { @ Override public void writeData ( Attributes attributes ) { try { writeStream ( attributes , s ) ; } finally { close ( ) ; } } } ) ; } } return data ; } private void close ( ) { } private static final Logger logger = LoggerFactory . getLogger ( ResourceStreamResource . class ) ; }

Fix:
data . setError ( SC_NOT_FOUND ) ;
Buggy code:
public class DefaultProviderImpl implements DefaultProvider { private static final RotationHandler rotationHandler = new RotationHandler ( ) { @ Override public boolean ignoreSlotId ( int slotId ) { } @ Override public int rotateSlotId ( int slotId ) { } } ; @ Override public void clearGrid ( EntityPlayer entityPlayer , Container container , IInventory craftMatrix ) { } @ Override public void clearGrid ( EntityPlayer entityPlayer , Container container , IInventory craftMatrix , int start , int size ) { } @ Override public void balanceGrid ( EntityPlayer entityPlayer , Container container , IInventory craftMatrix ) { } @ Override public void balanceGrid ( EntityPlayer entityPlayer , Container container , IInventory craftMatrix , int start , int size ) { ArrayListMultimap < String , ItemStack > itemMap = ArrayListMultimap . create ( ) ; Multiset < String > itemCount = HashMultiset . create ( ) ; for ( int i = start ; i < size ; i ++ ) { ItemStack itemStack = craftMatrix . getStackInSlot ( i ) ; if ( ( itemStack != null ) && ( ( itemStack . getMaxStackSize ( ) ) > 1 ) ) { <START_BUG> String key = ( ( itemStack . getUnlocalizedName ( ) ) + "@" ) + ( itemStack . getItemDamage ( ) ) ; <END_BUG> itemMap . put ( key , itemStack ) ; itemCount . add ( key , itemStack . stackSize ) ; } } for ( String key : itemMap . keySet ( ) ) { List < ItemStack > balanceList = itemMap . get ( key ) ; int totalCount = itemCount . count ( key ) ; int countPerStack = totalCount // ( balanceList . size ( ) ) ; int restCount = totalCount % ( balanceList . size ( ) ) ; for ( ItemStack itemStack : balanceList ) { itemStack . stackSize = countPerStack ; } int idx = 0 ; while ( restCount > 0 ) { ItemStack itemStack = balanceList . get ( idx ) ; if ( ( itemStack . stackSize ) < ( itemStack . getMaxStackSize ( ) ) ) { ( itemStack . stackSize ) ++ ; restCount -- ; } idx ++ ; if ( idx >= ( balanceList . size ( ) ) ) { idx = 0 ; } } } container . detectAndSendChanges ( ) ; } @ Override public ItemStack putIntoGrid ( EntityPlayer entityPlayer , Container container , IInventory craftMatrix , ItemStack itemStack , int index ) { } @ Override public ItemStack transferIntoGrid ( EntityPlayer entityPlayer , Container container , IInventory craftMatrix , ItemStack itemStack ) { } @ Override public void rotateGrid ( EntityPlayer entityPlayer , Container container , IInventory craftMatrix ) { } @ Override public void rotateGrid ( EntityPlayer entityPlayer , Container container , IInventory craftMatrix , int start , int size , RotationHandler rotationHandler ) { } @ Override public RotationHandler getRotationHandler ( ) { } }

Fix:
String key = ( ( itemStack . getUnlocalizedName ( ) ) + "@" ) + ( itemStack . getMetadata ( ) ) ;
Buggy code:
@ RunWith ( Arquillian . class ) @ RunAsClient public class SingletonTestCase { @ ArquillianResource private ContainerController controller ; @ ArquillianResource private Deployer deployer ; @ BeforeClass public static void printSysProps ( ) { } @ Deployment ( name = DEPLOYMENT_1 , managed = false , testable = false ) @ TargetsContainer ( CONTAINER_1 ) public static Archive < ? > deployment0 ( ) { } @ Deployment ( name = DEPLOYMENT_2 , managed = false , testable = false ) @ TargetsContainer ( CONTAINER_2 ) public static Archive < ? > deployment1 ( ) { } private static Archive < ? > createDeployment ( ) { WebArchive war = ShrinkWrap . create ( WebArchive . class , "singleton.war" ) ; war . addPackage ( MyService . class . getPackage ( ) ) ; <START_BUG> war . setManifest ( new StringAsset ( "Manifest-Version:<seq2seq4repair_space>1.0\nDependencies:<seq2seq4repair_space>org.jboss.msc,<seq2seq4repair_space>org.jboss.as.clustering.singleton,<seq2seq4repair_space>org.jboss.as.server,<seq2seq4repair_space>org.jboss.marshalling,<seq2seq4repair_space>org.jgroups\n" ) ) ; <END_BUG> return war ; } @ Test @ InSequence ( 1 ) public void testArquillianWorkaround ( ) { } @ Test @ InSequence ( 2 ) public void testSingletonService ( @ ArquillianResource @ OperateOnDeployment ( DEPLOYMENT_1 ) URL baseURL1 , @ ArquillianResource @ OperateOnDeployment ( DEPLOYMENT_2 ) URL baseURL2 ) throws IOException , InterruptedException { } private HttpResponse tryGet ( final DefaultHttpClient client , final String url1 ) throws IOException { } }

Fix:
war . setManifest ( new StringAsset ( "Manifest-Version:<seq2seq4repair_space>1.0\nDependencies:<seq2seq4repair_space>org.jboss.msc,<seq2seq4repair_space>org.jboss.as.clustering.common,<seq2seq4repair_space>org.jboss.as.clustering.singleton,<seq2seq4repair_space>org.jboss.as.server,<seq2seq4repair_space>org.jboss.marshalling,<seq2seq4repair_space>org.jgroups\n" ) ) ;
Buggy code:
public class Version { private Version ( ) { } public static String id ( ) { <START_BUG> return "4.6-SNAPSHOT-20080908-1523" ; <END_BUG> } public static void main ( String [ ] args ) { } }

Fix:
return "4.5" ;
Buggy code:
public class MapView extends View < MapPresenter > { @ FXML private GridPane grid ; @ FXML private Pane pane ; private Text text ; private ImageView character ; private ImageView mule ; private Timer timer ; private double mouseX ; private double mouseY ; private Rectangle timerWhite ; private Rectangle timerRed ; private LinkedList < ImageView > installedMuleImageViews ; @ FXML public void initialize ( ) { } public void displayMule ( ) { } public void stopDisplayingMule ( ) { } private void update ( ) { } private void updateTimer ( ) { } private void moveCharacter ( double pixelsPerSecond ) { } public void startMovement ( ) { } public void stopMovement ( ) { } public void showTurnStartText ( ) { } public void showRandomEventText ( String eventText ) { <START_BUG> text = new Text ( 250 , 120 , eventText ) ; <END_BUG> text . setFont ( new Font ( 40 ) ) ; pane . getChildren ( ) . add ( text ) ; text . toFront ( ) ; character . setX ( 340 ) ; character . setY ( 235 ) ; timer = new Timer ( ) ; timer . schedule ( new TimerTask ( ) { @ Override public void run ( ) { Platform . runLater ( ( ) -> { pane . getChildren ( ) . remove ( text ) ; startMovement ( ) ; } ) ; } } , 5000L ) ; } public void setCharacterImage ( String imagePath ) { } public void placeMuleGraphic ( int row , int col , MuleType type ) { } public static Point getImageCoordinates ( ImageView imageView ) { } public static Point getPixelOffset ( int row , int col ) { } private Group createBorder ( Color color ) { } public static ImageView createImageView ( String imagePath , int width , int height ) { } private void addImageToPane ( ImageView view , int x , int y ) { } }

Fix:
text = new Text ( 150 , 120 , eventText ) ;
Buggy code:
public final class PreferenceRegistry extends AbstractMutableRegistry { private static final String DEPRECATED_KEY_ACTIVE_KEY_CONFIGURATIONS = "acceleratorConfigurationId" ; private static final String DEPRECATED_KEY_KEY_BINDINGS = "org.eclipse.ui.keybindings" ; private static final String DEPRECATED_TAG_BINDING = "binding" ; private static final String DEPRECATED_TAG_BINDINGS = "bindings" ; private static final String DEPRECATED_TAG_ACCELERATOR = "accelerator" ; private static final String DEPRECATED_TAG_ACTION = "action" ; private static final String DEPRECATED_TAG_CONFIGURATION = "configuration" ; private static final String DEPRECATED_TAG_KEY_SEQUENCE = "keysequence" ; private static final String DEPRECATED_TAG_KEY_STROKE = "keystroke" ; private static final String DEPRECATED_TAG_PLUGIN = "plugin" ; private static final String DEPRECATED_TAG_RANK = "rank" ; private static final String DEPRECATED_TAG_SCOPE = "scope" ; private static final String KEY = Persistence . PACKAGE_FULL ; private static final int RANK_PREFERENCE = 0 ; private static final String TAG_ROOT = Persistence . PACKAGE_FULL ; public static PreferenceRegistry instance ; public static PreferenceRegistry getInstance ( ) { } private PreferenceRegistry ( ) { } public void load ( ) throws IOException { } public void save ( ) throws IOException { } private static KeyBinding readDeprecatedKeyBinding ( IMemento memento ) throws IllegalArgumentException { if ( memento == null ) throw new IllegalArgumentException ( ) ; String command = memento . getString ( PreferenceRegistry . DEPRECATED_TAG_ACTION ) ; String keyConfiguration = memento . getString ( PreferenceRegistry . DEPRECATED_TAG_CONFIGURATION ) ; if ( keyConfiguration == null ) keyConfiguration = Persistence . ZERO_LENGTH_STRING ; KeySequence keySequence = null ; IMemento mementoKeySequence = memento . getChild ( PreferenceRegistry . DEPRECATED_TAG_KEY_SEQUENCE ) ; if ( mementoKeySequence != null ) keySequence = PreferenceRegistry . readDeprecatedKeySequence ( mementoKeySequence ) ; if ( keySequence == null ) keySequence = Persistence . ZERO_LENGTH_KEY_SEQUENCE ; String plugin = memento . getString ( PreferenceRegistry . DEPRECATED_TAG_PLUGIN ) ; String scope = memento . getString ( PreferenceRegistry . DEPRECATED_TAG_SCOPE ) ; if ( scope == null ) scope = Persistence . ZERO_LENGTH_STRING ; <START_BUG> return KeyBinding . create ( command , keyConfiguration , keySequence , ZERO_LENGTH_STRING , ZERO_LENGTH_STRING , plugin , 0 , scope ) ; <END_BUG> } private static List readDeprecatedKeyBindings ( IMemento memento , String name ) throws IllegalArgumentException { } private static KeySequence readDeprecatedKeySequence ( IMemento memento ) throws IllegalArgumentException { } private static KeyStroke readDeprecatedKeyStroke ( IMemento memento ) throws IllegalArgumentException { } }

Fix:
return KeyBinding . create ( command , keyConfiguration , keySequence , ZERO_LENGTH_STRING , ZERO_LENGTH_STRING , plugin , PreferenceRegistry . RANK_PREFERENCE , scope ) ;
Buggy code:
public class WSSubsystemAdd extends AbstractBoottimeAddStepHandler { static final WSSubsystemAdd INSTANCE = new WSSubsystemAdd ( ) ; @ Override protected void populateModel ( final ModelNode operation , final ModelNode model ) throws OperationFailedException { } protected void performBoottime ( OperationContext context , ModelNode operation , ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) throws OperationFailedException { } private static ServerConfigImpl createServerConfig ( ModelNode configuration , boolean appclient , OperationContext context ) throws OperationFailedException { final ServerConfigImpl config = ServerConfigImpl . newInstance ( ) ; try { ModelNode wsdlHost = WSDL_HOST . resolveModelAttribute ( context , configuration ) ; <START_BUG> config . setWebServiceHost ( wsdlHost . asString ( ) ) ; <END_BUG> } catch ( UnknownHostException e ) { throw new RuntimeException ( e ) ; } if ( ! appclient ) { config . setModifySOAPAddress ( MODIFY_WSDL_ADDRESS . resolveModelAttribute ( context , configuration ) . asBoolean ( ) ) ; } if ( configuration . hasDefined ( Constants . WSDL_PORT ) ) { config . setWebServicePort ( WSDL_PORT . resolveModelAttribute ( context , configuration ) . asInt ( ) ) ; } if ( configuration . hasDefined ( Constants . WSDL_SECURE_PORT ) ) { config . setWebServiceSecurePort ( WSDL_SECURE_PORT . resolveModelAttribute ( context , configuration ) . asInt ( ) ) ; } return config ; } }

Fix:
config . setWebServiceHost ( ( wsdlHost . isDefined ( ) ? wsdlHost . asString ( ) : null ) ) ;
Buggy code:
public class WordCount extends Configured implements Tool { private static final Logger logger = LoggerFactory . getLogger ( WordCount . class ) ; static final String KEYSPACE = "Keyspace1" ; static final String COLUMN_FAMILY = "Standard1" ; static final String OUTPUT_REDUCER_VAR = "output_reducer" ; static final String OUTPUT_COLUMN_FAMILY = "Standard2" ; private static final String OUTPUT_PATH_PREFIX = "//tmp//word_count" ; private static final String CONF_COLUMN_NAME = "columnname" ; public static void main ( String [ ] args ) throws Exception { } public static class TokenizerMapper extends Mapper < byte [ ] , SortedMap < byte [ ] , IColumn > , Text , IntWritable > { private static final IntWritable one = new IntWritable ( 1 ) ; private Text word = new Text ( ) ; private String columnName ; public void map ( byte [ ] key , SortedMap < byte [ ] , IColumn > columns , Context context ) throws IOException , InterruptedException { IColumn column = columns . get ( columnName . getBytes ( ) ) ; if ( column == null ) return ; <START_BUG> String value = ByteBufferUtil . string ( column . value ( ) , UTF_8 ) ; <END_BUG> WordCount . logger . debug ( ( ( ( ( ( "read<seq2seq4repair_space>" + key ) + ":" ) + value ) + "<seq2seq4repair_space>from<seq2seq4repair_space>" ) + ( context . getInputSplit ( ) ) ) ) ; StringTokenizer itr = new StringTokenizer ( value ) ; while ( itr . hasMoreTokens ( ) ) { word . set ( itr . nextToken ( ) ) ; context . write ( word , WordCount . TokenizerMapper . one ) ; } } protected void setup ( Mapper . Context context ) throws IOException , InterruptedException { } } public static class ReducerToFilesystem extends Reducer < Text , IntWritable , Text , IntWritable > { private IntWritable result = new IntWritable ( ) ; public void reduce ( Text key , Iterable < IntWritable > values , Context context ) throws IOException , InterruptedException { } } public static class ReducerToCassandra extends Reducer < Text , IntWritable , ByteBuffer , List < Mutation > > { private List < Mutation > results = new ArrayList < Mutation > ( ) ; private String columnName ; public void reduce ( Text key , Iterable < IntWritable > values , Context context ) throws IOException , InterruptedException { } protected void setup ( Reducer . Context context ) throws IOException , InterruptedException { } private static Mutation getMutation ( Text key , int sum ) { } private static ColumnOrSuperColumn getCoSC ( Text key , int sum ) { } } public int run ( String [ ] args ) throws Exception { } }

Fix:
String value = ByteBufferUtil . string ( column . value ( ) ) ;
Buggy code:
public class XSDToolsPlugin extends AbstractUIPlugin { private static XSDToolsPlugin plugin ; public static final String PLUGIN_ID = "org.eclipse.xtend.typesystem.xsd.ui" ; public static boolean trace = false ; public static XSDToolsPlugin getDefault ( ) { } public static boolean isXSDProject ( IProject proj ) { } public static void traceLog ( String msg ) { if ( XSDToolsPlugin . trace ) <START_BUG> System . out . println ( ( ( ( "oAW-XSD[" + ( Thread . currentThread ( ) . getName ( ) ) ) + "]:<seq2seq4repair_space>" ) + msg ) ) ; <END_BUG> } private XSDBuilderConfigurator builderConfigurator = new XSDBuilderConfigurator ( ) ; private XSDMetamodelStore store = new XSDMetamodelStore ( ) ; public XSDToolsPlugin ( ) { } public XSDMetamodelStore getXSDStore ( ) { } public void start ( BundleContext context ) throws Exception { } public void stop ( BundleContext context ) throws Exception { } }

Fix:
System . out . println ( ( ( ( "XSD<seq2seq4repair_space>adapter<seq2seq4repair_space>[" + ( Thread . currentThread ( ) . getName ( ) ) ) + "]:<seq2seq4repair_space>" ) + msg ) ) ;
Buggy code:
public final class CookieImpl extends ScopeSupport implements Cookie , ScriptProtected { private static final long serialVersionUID = - 2341079090783313736L ; public static final int NEVER = 946626690 ; private HttpServletResponse rsp ; private int scriptProtected = ScriptProtected . UNDEFINED ; private Map < String , String > raw = new HashMap < String , String > ( ) ; private String charset ; public CookieImpl ( ) { } public Object setEL ( Collection . Key key , Object value ) { } public Object set ( Collection . Key key , Object value ) throws PageException { } private void set ( Config config , javax . servlet . http . Cookie cookie ) throws PageException { String name = StringUtil . toLowerCase ( ReqRspUtil . decode ( cookie . getName ( ) , charset , false ) ) ; raw . put ( name , cookie . getValue ( ) ) ; if ( isScriptProtected ( ) ) super . set ( KeyImpl . init ( name ) , ScriptProtect . translate ( dec ( cookie . getValue ( ) ) ) ) ; else <START_BUG> super . set ( KeyImpl . init ( name ) , cookie . getValue ( ) ) ; <END_BUG> } public void clear ( ) { } public Object remove ( String key ) throws PageException { } public Object remove ( Collection . Key key ) throws PageException { } public Object remove ( Collection . Key key , boolean alsoInResponse ) throws PageException { } public Object removeEL ( Collection . Key key ) { } private Object removeEL ( Collection . Key key , boolean alsoInResponse ) { } private void removeCookie ( Collection . Key key ) { } public void setCookie ( String name , Object value , Object expires , boolean secure , String path , String domain ) throws PageException { } public void setCookie ( Collection . Key key , Object value , Object expires , boolean secure , String path , String domain ) throws PageException { } private int toExpires ( String expires ) throws ExpressionException { } private int toExpires ( Number expires ) { } private int toExpires ( int expires ) { } private int toExpires ( Date expires ) { } private int toExpires ( TimeSpan span ) { } public void setCookie ( String name , Object value , int expires , boolean secure , String path , String domain ) throws PageException { } public void setCookie ( Collection . Key key , Object value , int expires , boolean secure , String path , String domain ) throws PageException { } public void setCookieEL ( String name , Object value , int expires , boolean secure , String path , String domain ) { } public void setCookieEL ( Collection . Key key , Object value , int expires , boolean secure , String path , String domain ) { } public void initialize ( PageContext pc ) { } public void release ( ) { } public boolean isScriptProtected ( ) { } public void setScriptProtecting ( boolean scriptProtected ) { } public String dec ( String str ) { } public String enc ( String str ) { } No newline ; at end ; of file ; }

Fix:
super . set ( KeyImpl . init ( name ) , dec ( cookie . getValue ( ) ) ) ;
Buggy code:
public class TagsListDialogFragment extends DialogFragment { public static TagsListDialogFragment newInstance ( ) { } public static interface Callback { void selectedTagName ( String name ) { } } private TagsListDialogFragment . Callback mCallback ; public void setCallback ( TagsListDialogFragment . Callback callback ) { } @ NonNull @ Override public Dialog onCreateDialog ( Bundle savedInstanceState ) { AlertDialog . Builder builder = new AlertDialog . Builder ( getActivity ( ) ) ; <START_BUG> final Cursor cursor = getActivity ( ) . getContentResolver ( ) . query ( CONTENT_URI , null , null , null , null ) ; <END_BUG> builder . setTitle ( tag ) ; builder . setSingleChoiceItems ( cursor , ( - 1 ) , COLUMN_NAME , new DialogInterface . OnClickListener ( ) { @ Override public void onClick ( DialogInterface dialog , int which ) { if ( ( mCallback ) == null ) { throw new RuntimeException ( "Set<seq2seq4repair_space>Callback" ) ; } cursor . moveToPosition ( which ) ; mCallback . selectedTagName ( cursor . getString ( cursor . getColumnIndex ( COLUMN_NAME ) ) ) ; dialog . dismiss ( ) ; } } ) ; return builder . create ( ) ; } }

Fix:
final Cursor cursor = getActivity ( ) . getContentResolver ( ) . query ( CONTENT_URI , null , null , null , ( ( Tags . COLUMN_NAME ) + "<seq2seq4repair_space>ASC" ) ) ;
Buggy code:
public class ThreadGroupGui extends AbstractJMeterGuiComponent implements ItemListener { LoopControlPanel loopPanel ; private VerticalPanel mainPanel ; private static final String THREAD_NAME = "Thread<seq2seq4repair_space>Field" ; private static final String RAMP_NAME = "Ramp<seq2seq4repair_space>Up<seq2seq4repair_space>Field" ; private JTextField threadInput ; private JTextField rampInput ; private JDateField start ; private JDateField end ; private JCheckBox scheduler ; private JTextField duration ; private JTextField delay ; private JRadioButton continueBox ; private JRadioButton stopThrdBox ; private JRadioButton stopTestBox ; public ThreadGroupGui ( ) { } public Collection getMenuCategories ( ) { } public TestElement createTestElement ( ) { } public void modifyTestElement ( TestElement tg ) { } private void setSampleErrorBoxes ( ThreadGroup te ) { } private String onSampleError ( ) { } public void configure ( TestElement tg ) { } public void itemStateChanged ( ItemEvent ie ) { } public JPopupMenu createPopupMenu ( ) { JPopupMenu pop = new JPopupMenu ( ) ; <START_BUG> pop . add ( MenuFactory . makeMenus ( new String [ ] { MenuFactory . CONTROLLERS , MenuFactory . LISTENERS , MenuFactory . SAMPLERS , MenuFactory . TIMERS , MenuFactory . CONFIG_ELEMENTS , MenuFactory . PRE_PROCESSORS , MenuFactory . POST_PROCESSORS } , JMeterUtils . getResString ( "Add" ) , "Add" ) ) ; <END_BUG> MenuFactory . addEditMenu ( pop , true ) ; MenuFactory . addFileMenu ( pop ) ; return pop ; } public JPanel createControllerPanel ( ) { } private JPanel createStartTimePanel ( ) { } private JPanel createEndTimePanel ( ) { } private JPanel createDurationPanel ( ) { } private JPanel createDelayPanel ( ) { } public String getLabelResource ( ) { } private JPanel createOnErrorPanel ( ) { } private void init ( ) { } public void setNode ( JMeterTreeNode node ) { } public Dimension getPreferredSize ( ) { } }

Fix:
pop . add ( MenuFactory . makeMenus ( new String [ ] { MenuFactory . CONTROLLERS , MenuFactory . LISTENERS , MenuFactory . SAMPLERS , MenuFactory . ASSERTIONS , MenuFactory . TIMERS , MenuFactory . CONFIG_ELEMENTS , MenuFactory . PRE_PROCESSORS , MenuFactory . POST_PROCESSORS } , JMeterUtils . getResString ( "Add" ) , "Add" ) ) ;
Buggy code:
public class SimpleListView extends LinearLayout { private static final int INVALID = - 1 ; private BaseAdapter adapter ; private DataSetObserver dataSetObserver ; private final LayoutInflater layoutInflater ; private int dividerViewResourceId = SimpleListView . INVALID ; private View headerView ; private View footerView ; private SimpleListView . OnItemClickListener itemClickListener ; public SimpleListView ( Context context ) { } public SimpleListView ( Context context , AttributeSet attrs ) { } public void setDividerView ( int resourceId ) { } public void setOnItemClickListener ( SimpleListView . OnItemClickListener listener ) { } public void setHeaderView ( View view ) { } public void setHeaderView ( int resourceId ) { } public void setFooterView ( View view ) { } public void setFooterView ( int resourceId ) { } public void setAdapter ( BaseAdapter adapter ) { if ( adapter == null ) { throw new NullPointerException ( "Adapter<seq2seq4repair_space>may<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>null" ) ; } if ( ( ( this . adapter ) != null ) && ( ( this . dataSetObserver ) != null ) ) { <START_BUG> adapter . unregisterDataSetObserver ( dataSetObserver ) ; <END_BUG> } this . adapter = adapter ; this . dataSetObserver = new SimpleListView . AdapterDataSetObserver ( ) ; this . adapter . registerDataSetObserver ( dataSetObserver ) ; resetList ( ) ; refreshList ( ) ; } private void refreshList ( ) { } private void resetList ( ) { } class AdapterDataSetObserver extends DataSetObserver { @ Override public void onChanged ( ) { } } public interface OnItemClickListener { void onItemClick ( Object item , View view , int position ) { } } }

Fix:
this . adapter . unregisterDataSetObserver ( dataSetObserver ) ;
Buggy code:
public class DOM3 implements DOMErrorHandler , LSParserFilter { protected static final boolean DEFAULT_NAMESPACES = true ; protected static final boolean DEFAULT_VALIDATION = false ; protected static final boolean DEFAULT_SCHEMA_VALIDATION = false ; static LSParser builder ; public static void main ( String [ ] argv ) { if ( ( argv . length ) == 0 ) { DOM3 . printUsage ( ) ; System . exit ( 1 ) ; } try { <START_BUG> System . setProperty ( DOMImplementationRegistry . PROPERTY , "org.apache.xerces.dom.DOMImplementationSourceImpl" ) ; <END_BUG> DOMImplementationRegistry registry = DOMImplementationRegistry . newInstance ( ) ; DOMImplementationLS impl = ( ( DOMImplementationLS ) ( registry . getDOMImplementation ( "LS" ) ) ) ; DOM3 . builder = impl . createLSParser ( DOMImplementationLS . MODE_SYNCHRONOUS , null ) ; DOMConfiguration config = DOM3 . builder . getConfig ( ) ; DOMErrorHandler errorHandler = new DOM3 ( ) ; LSParserFilter filter = new DOM3 ( ) ; DOM3 . builder . setFilter ( filter ) ; config . setParameter ( "error-handler" , errorHandler ) ; config . setParameter ( "validate" , Boolean . TRUE ) ; config . setParameter ( "schema-type" , "http:////www.w3.org//2001//XMLSchema" ) ; config . setParameter ( "schema-location" , "personal.xsd" ) ; System . out . println ( ( ( "Parsing<seq2seq4repair_space>" + ( argv [ 0 ] ) ) + "..." ) ) ; Document doc = DOM3 . builder . parseURI ( argv [ 0 ] ) ; config = doc . getDomConfig ( ) ; config . setParameter ( "error-handler" , errorHandler ) ; config . setParameter ( "validate" , Boolean . TRUE ) ; config . setParameter ( "schema-type" , "http:////www.w3.org//2001//XMLSchema" ) ; config . setParameter ( "schema-location" , "data//personal.xsd" ) ; config . setParameter ( "comments" , Boolean . FALSE ) ; System . out . println ( "Normalizing<seq2seq4repair_space>document...<seq2seq4repair_space>" ) ; doc . normalizeDocument ( ) ; LSSerializer domWriter = impl . createLSSerializer ( ) ; System . out . println ( "Serializing<seq2seq4repair_space>document...<seq2seq4repair_space>" ) ; config = domWriter . getConfig ( ) ; config . setParameter ( "xml-declaration" , Boolean . FALSE ) ; LSOutput dOut = new DOMOutputImpl ( ) ; dOut . setByteStream ( System . out ) ; domWriter . write ( doc , dOut ) ; } catch ( Exception ex ) { ex . printStackTrace ( ) ; } } private static void printUsage ( ) { } public boolean handleError ( DOMError error ) { } public short acceptNode ( Node enode ) { } public int getWhatToShow ( ) { } public short startElement ( Element elt ) { } }

Fix:
System . setProperty ( DOMImplementationRegistry . PROPERTY , "org.apache.xerces.dom.DOMXSImplementationSourceImpl" ) ;